def loadAll(self, class_alias): class_def = self.getClassDefByAlias(class_alias) session = Schema().session return session.query(class_def.class_).all()
def load(self, class_alias, key): class_def = self.getClassDefByAlias(class_alias) session = Schema().session return session.query(class_def.class_).get(key)
def remove(self, class_alias, key): class_def = self.getClassDefByAlias(class_alias) session = Schema().session obj = session.query(class_def.class_).get(key) session.delete(obj) session.commit()
def loadAll(self, class_alias): klass = pyamf.load_class(class_alias).klass session = Schema().session return session.query(klass).all()
def remove(self, class_alias, key): klass = pyamf.load_class(class_alias).klass session = Schema().session obj = session.query(klass).get(key) session.delete(obj) session.commit()
def load(self, class_alias, key): klass = pyamf.load_class(class_alias).klass session = Schema().session return session.query(klass).get(key)