source: package_tags/sipb-xen-database/10.24/python/database/__init__.py @ 977

Last change on this file since 977 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
Line 
1from invirt.config import structs as config
2from models import *
3import sqlalchemy
4
5def connect(uri = config.db.uri):
6    """ Connect to a given database URI"""
7    meta.bind = sqlalchemy.create_engine(uri)
Note: See TracBrowser for help on using the repository browser.