コード例 #1
0
 def _search(cls, **kwargs):
     session = SessionHeap()
     query = session.query(cls).filter_by(**kwargs)
     SessionHeap.remove()
     return query
コード例 #2
0
 def query(cls, **kwargs):
     session = SessionHeap()
     query = session.query(cls)
     SessionHeap.remove()
     return query
コード例 #3
0
 def create(cls, **kwargs):
     session = SessionHeap()
     session.add(cls(**kwargs))
     session.commit()
     session.close()
     SessionHeap.remove()