self._session.close()
self._session=None
- def commit (self):
- self.session().commit()
-
- def insert (self, stuff, commit=False):
- if isinstance (stuff,list):
- self.session().add_all(stuff)
- else:
- self.session().add(obj)
-
- # for compat with the previous PostgreSQL stuff
- def update (self, record):
- self.commit()
-
- def remove (self, record):
- self.delete(record)
- self.commit()
-
####################
from sfa.util.config import Config
return RegRecord.__repr__(self).replace("Record","Node")
##############################
+# although the db needs of course to be reachable,
+# the schema management functions are here and not in alchemy
+# because the actual details of the classes need to be known
def init_tables(dbsession):
logger.info("Initializing db schema and builtin types")
# the doc states we could retrieve the engine this way