Awesome. Thanks for tackling this, I just haven't had any free time to look
into it. Do I need to want until the next Sequel release before I can use
this, or can I pull in your commit manually?

Doug

On Thu, Dec 13, 2012 at 3:30 PM, Jeremy Evans <[email protected]>wrote:

> On Friday, December 7, 2012 8:42:59 AM UTC-8, Jeremy Evans wrote:
>
>> I don't believe Sequel currently supports parsing metadata for 3-level
>> qualified tables (omegadb.dbo.tblfiles) on Microsoft SQL Server. Do you
>> have to qualify dbo.tblfiles with omegadb?  I'm guessing yes because you
>> want to refer to dbo.tblfiles in the omegadb database (when you are
>> connected to another database on the same server), but if not, you could
>> just drop the qualification with omegadb.
>>
>> Fixing this probably requires changing the  Microsoft SQL Server
>> schema_parse_table method to recognize 3-level qualified tables, by
>> selecting from database_name.information_**schema.table instead of just
>> information_schema.table in the three-level qualification case.  It also
>> would require refactoring the general Database#schema method to call
>> methods that can be overridden in adapters, and overriding those methods in
>> the mssql shared adapter to recognize 3-level qualified tables and handle
>> them appropriately (passing the 3rd level qualifier via a separate option
>> to schema_parse_table such as :information_schema_schema).  Do you want to
>> take a shot at creating a patch that does that?
>>
>> Note that Microsoft SQL Server supports 4-level qualified tables (
>> http://msdn.microsoft.com/en-**us/library/ms187879%28v=sql.**105%29.aspx<http://msdn.microsoft.com/en-us/library/ms187879%28v=sql.105%29.aspx>),
>> so you might want to consider that case as well.  I'm assuming it can be
>> handled the same way as the 3-level qualified case, but having the
>> :information_schema_schema option be a qualified identifier instead of a
>> regular identifier.
>>
>
> I've committed changes to Sequel that should allow this to work correctly:
> https://github.com/jeremyevans/sequel/commit/7633e3f917d062af66dae38401de65ccfae97b4e
>
> Thanks,
>
> Jeremy
>
> --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sequel-talk/-/AjRB3iZGaa0J.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sequel-talk?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to