projects
/
invirt/packages/invirt-database.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The database wants to be not transactional, and not autoflushing
[invirt/packages/invirt-database.git]
/
python
/
database
/
__init__.py
diff --git
a/python/database/__init__.py
b/python/database/__init__.py
index
88e5169
..
258c4d4
100644
(file)
--- a/
python/database/__init__.py
+++ b/
python/database/__init__.py
@@
-1,6
+1,9
@@
from invirt.config import structs as config
from models import *
from invirt.config import structs as config
from models import *
+import sqlalchemy
def connect(uri = config.db.uri):
""" Connect to a given database URI"""
def connect(uri = config.db.uri):
""" Connect to a given database URI"""
- meta.connect(uri)
+ engine = sqlalchemy.create_engine(uri)
+ meta.bind = engine
+ session.configure(bind=engine)