On Friday, September 5, 2003, at 10:49 AM, Tracy S. Ruggles wrote:
> Was there a suggestion on how to deal with multiple databases with the
> same tables? I have an admin database that has content-related tables
> that periodically get "published" to the live database. I was
> wondering if anyone had a suggestion about how to re-use an SQLObject
> class definitions with multiple _connection objects.
Shouldn't be a big problem. You can pass the connection during
instantiation, if you want to use the exact same class. Otherwise
subclassing, like:
develConn = PostgresConnection('devel...')
liveConn = PostgresConnection('live...')
class Whatever(SQLObject):
_connection = develConn
...
class LiveWhatever(Whatever):
_connection = liveConn
Ian
|