if you want the behavior to happen within SA itself in a transparent
way, youd have to provide redefined versions of sqlite.SLDialect and
mysql.MSDialect and friends which add these behaviors in. but
personally I wouldnt want to insert those behaviors into SA itself. id
rather write an app that just says:
from sqlalchemy.engine import url
def make_my_database(dburl, schemaname):
url_obj = url.make_url(dburl)
table_prefix = ''
if url_obj.drivername == 'sqlite':
url_obj.host=url_obj.host + schemaname + ".db"
elif url_obj.drivername == 'mysql':
table_prefix = schemaname + "_"
metadata = BoundMetaData(dburl)
table1 = Table(table_prefix + "table1", meta, ,...)
table2 = Table(table_prefix + "table2", meta, ....)
return metadata
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---