On Dec 3, 2012, at 10:20 PM, Derek Harland wrote: > The MSSQL dialect in 0.8.x seems to have had many of the reflection methods > changed from something like: > > @reflection.cache > def get_view_names(self, connection, schema=None, **kw): > > to > > @reflection.cache > @_db_plus_owner_listing > def get_view_names(self, connection, dbname, owner, schema, **kw): > > where the decorator _db_plus_owner_listing is defined as: > > def _db_plus_owner_listing(fn): > def wrap(dialect, connection, schema=None, **kw): > dbname, owner = _owner_plus_db(dialect, schema) > return _switch_db(dbname, connection, fn, dialect, connection, > dbname, owner, schema, **kw) > return update_wrapper(wrap, fn) > > It seems that they are being extended so people can use schema in this > fashion: "<database>.<schema>" > > This won't work as it stands. Schemas are themselves allowed to contain a > ".", thus running any reflection on a schema "firstname.lastname" crashes (it > will try to switch to a database called "firstname" and inspect the schema > "lastname")
my understanding is that users are able to use this <dbname>.<schema>.<table> syntax directly in SQL server, is that correct? In that case, how does SQL server make the distinction? If the DB has: database A -> schema B -> table C database DEFAULT -> schema A.B -> table C then what does SQL server consider "A.B.C" to mean ? > > derek. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" 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/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en.
