From: Thierry Parmentelat Date: Wed, 25 Jan 2012 16:40:44 +0000 (+0100) Subject: cosmetic X-Git-Tag: before-migrate^0 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2d94bbfb87d2458bba9da28a7c7a237cc1537004;hp=f5b8415e55c7d889dda5663a5742a2ccd684e047;p=sfa.git cosmetic --- diff --git a/sfa/storage/alchemy.py b/sfa/storage/alchemy.py index ead5219d..84879a6f 100644 --- a/sfa/storage/alchemy.py +++ b/sfa/storage/alchemy.py @@ -59,23 +59,6 @@ class Alchemy: 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 diff --git a/sfa/storage/persistentobjs.py b/sfa/storage/persistentobjs.py index b79fb9be..8ff81ed8 100644 --- a/sfa/storage/persistentobjs.py +++ b/sfa/storage/persistentobjs.py @@ -210,6 +210,9 @@ class RegNode (RegRecord): 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