-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
>> PoolListener is rather low level; if I use them I need to know in
>> advance the secondary databases to attach.
>
> What precisely is the use case for an application that will use a database
> X, will be using remote schemas P, Q, and R, but its unreasonable for
> those schemas P, Q and R to be configured along with the database
> connectivity ?
The reason is that I'm abusing the MetaData object to implement
namespace (namespace = SQL schema) support.
So it is natural (for me) to create the schemas as a DDL attached to the
MetaData.
Note that I'm also abusing SQLite attach database support, in order to
emulate schemas.
> I see an easy feature add to the SQLite dialect that would
> allow:
>
> create_engine('sqlite:///X.db', schemas=['p', 'q', 'r'])
>
Not sure if SQLAlchemy should implement an high level interface (schema)
to a low level SQLite feature.
You have to force an algorithm to associate a schema name to a database
file name.
> Alternatively, I can even see using connection options for this, if you
> want to attach to those schemas per connection:
>
> conn = engine.connect().execution_options(sqlite_attach_schemas=['p', 'q',
> 'r'])
>
Regards Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAktxj0kACgkQscQJ24LbaURZBgCgjX5eSrRudVh04ccoomIGMZw9
fvoAn1mLAiZd79mNdjHITAvAhHngrTce
=h8BJ
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.