against datetimes that dont).
- fix to using query.count() with distinct, **kwargs with SelectResults
count() [ticket:287]
+- deregister Table from MetaData when autoload fails; [ticket:289]
0.2.7
- quoting facilities set up so that database-specific quoting can be
# we do it after the table is in the singleton dictionary to support
# circular foreign keys
if autoload:
- if autoload_with:
- autoload_with.reflecttable(table)
- else:
- metadata.engine.reflecttable(table)
+ try:
+ if autoload_with:
+ autoload_with.reflecttable(table)
+ else:
+ metadata.engine.reflecttable(table)
+ except exceptions.NoSuchTableError:
+ table.deregister()
+ raise
# initialize all the column, etc. objects. done after
# reflection to allow user-overrides
table._init_items(*args)