cosmetic before-migrate
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 25 Jan 2012 16:40:44 +0000 (17:40 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 25 Jan 2012 16:40:44 +0000 (17:40 +0100)
sfa/storage/alchemy.py
sfa/storage/persistentobjs.py

index ead5219..84879a6 100644 (file)
@@ -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
 
index b79fb9b..8ff81ed 100644 (file)
@@ -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