I've been working on breaking Dialect.reflecttable into components so that they can be used independently (e.g. get_columns, get_foreign_keys, etc). One of the original goals was to be able to do away with reflecttable and have the Inspector, engine.reflection.Inspector, construct the table using the more granular methods. This has proven to be difficult because several dialects do something "special" when creating the table. Oracle deals with synonyms, MSSQL deals with identity columns, etc. So was thinking, this could be solved by adding granular table construction methods.
class SomeDialect: def get_columns( ... def get_foreign_keys( ... def reflect_columns(self, table, columns ... def reflect_foreign_keys(self table, fkeys ... So the inspector would build a table with its reflecttable method: class Inspector: def get_columns(... def get_foreign_keys(... ... def reflecttable(self, table ...) self.engine.dialect.add_columns(table, connection, self.info_cache ... self.engine.dialect.add_foreign_keys(table, connection ... For the various reflect_* methods, there would be a default implementation on DefaultDialect. What do you think? --Randall --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---