On Saturday 06 February 2010 06:54:31 Petr Jakeš wrote:
> > In order to create the DB objects inside the approppriate DB, AFAIK I can
> > pass a connection parameter in the class creation, and all will be fine.
> > But how do I go about doing selects and obtaining results from a specific
> > DB? I may have two DBs open, and each with its file & dir structure
> > inside. If I want to do, say, File.select(), how can I specify that I
> > want results from only one of the DBs?
>
> What about:
>
> from sqlobject import *
>
> connection01 = connectionForURI('sqlite:/:memory:')
> connection02 = connectionForURI('sqlite:/:memory:')
>
> class File01(SQLObject):
> _connection = connection01
>
> class File02(SQLObject):
> _connection = connection02
>
I don't think that serves the purpose. The program is supposed to let the user
scan whatever structure he/she wants, and this way i'm limiting that, and it
is also not scalable.
Thanks anyway
|