On 14 April 2010 12:11, Oleg Broytman <ph...@ph...> wrote:
> On Tue, Apr 13, 2010 at 11:49:47PM +0200, Visgean Skeloru wrote:
> > Hello is it possible to set a specific connections database for each
> class?
>
> Yes. Every SQLObject class has a classmethod setConnection. Call it
> MyTable.setConnection(connection); connection can be a string or an open
> connection (SQLObject's DBConnection, not a Python DB API connection).
> Every method has a connection parameter.
>
> Or you can define your connection directly in the Class as an attribute,
for example:
_connection = connectionRAMdisk
I do not know, if this is the cleanest way, but works great.
Petr
|