Last change
on this file since 985 was
946,
checked in by price, 16 years ago
|
port sipb-xen-database to sqlalchemy-0.4
Apparently they like breaking old interfaces (e.g. DynamicMetaData?,
sqlalchemy.create_session, sqlalchemy.relation) when they add new ones.
Also letting other old interfaces (e.g. meta.connect) bitrot even
while still present.
|
File size:
207 bytes
|
Rev | Line | |
---|
[829] | 1 | from invirt.config import structs as config |
---|
[77] | 2 | from models import * |
---|
[946] | 3 | import sqlalchemy |
---|
[77] | 4 | |
---|
[829] | 5 | def connect(uri = config.db.uri): |
---|
[77] | 6 | """ Connect to a given database URI""" |
---|
[946] | 7 | meta.bind = sqlalchemy.create_engine(uri) |
---|
Note: See
TracBrowser
for help on using the repository browser.