source: trunk/packages/sipb-xen-database/python/database/__init__.py @ 986

Last change on this file since 986 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
RevLine 
[829]1from invirt.config import structs as config
[77]2from models import *
[946]3import sqlalchemy
[77]4
[829]5def 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.