From 2d94bbfb87d2458bba9da28a7c7a237cc1537004 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 25 Jan 2012 17:40:44 +0100 Subject: [PATCH] cosmetic --- sfa/storage/alchemy.py | 17 ----------------- sfa/storage/persistentobjs.py | 3 +++ 2 files changed, 3 insertions(+), 17 deletions(-) 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 -- 2.43.0