Exemplo n.º 1
0
 def find_by_id(self, key):
     return session.query(Student).get(key)
Exemplo n.º 2
0
 def delete(self, key):
     student = session.query(Student).get(key)
     session.delete(student)
Exemplo n.º 3
0
 def find_all(self):
     return session.query(Student).all()
Exemplo n.º 4
0
 def update(self, key, obj):
     student = session.query(Student).get(key)
     student.full_update(obj)
     session.commit()
Exemplo n.º 5
0
 def patch(self, key, field_name, value):
     student = session.query(Student).get(key)
     setattr(student, field_name, value)
     session.commit()
Exemplo n.º 6
0
 def find_all(self):
     return session.query(Group).all()
Exemplo n.º 7
0
 def find_by_id(self, key):
     return session.query(Group).get(key)
Exemplo n.º 8
0
 def patch(self, key, field_name, value):
     group = session.query(Group).get(key)
     setattr(group, field_name, value)
     session.commit()
Exemplo n.º 9
0
 def delete(self, key):
     group = session.query(Group).get(key)
     session.delete(group)
     session.commit()
Exemplo n.º 10
0
 def find_all(self):
     return session.query(self._domain_type).all()
Exemplo n.º 11
0
 def update(self, key, obj):
     group = session.query(Group).get(key)
     group.full_update(obj)
     session.commit()
Exemplo n.º 12
0
 def delete_all(self):
     session.query(self._domain_type).delete()
     session.commit()
Exemplo n.º 13
0
 def delete(self, key):
     domain_obj = session.query(self._domain_type).get(key)
     session.delete(domain_obj)
     session.commit()
Exemplo n.º 14
0
 def patch(self, key, field_name, value):
     domain_obj = session.query(self._domain_type).get(key)
     setattr(domain_obj, field_name, value)
     session.commit()
Exemplo n.º 15
0
 def update(self, key, obj):
     domain_obj = session.query(self._domain_type).get(key)
     domain_obj.full_update(obj)
     session.commit()
Exemplo n.º 16
0
 def find_by_id(self, key):
     return session.query(self._domain_type).get(key)