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")
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.