Пример #1
0
def delete(instance):
    with scoped_session() as db:
        db.delete(instance)
Пример #2
0
def add(instance):
    with scoped_session() as db:
        db.add(instance)
Пример #3
0
def add_all(instances):
    with scoped_session() as db:
        db.add_all(instances)
Пример #4
0
def add(instance):
    with scoped_session() as db:
        db.add(instance)
Пример #5
0
def merge(instance, load=True):
    with scoped_session() as db:
        db.merge(instance, load=load)
Пример #6
0
def delete(instance):
    with scoped_session() as db:
        db.delete(instance)
Пример #7
0
def add_all(instances):
    with scoped_session() as db:
        db.add_all(instances)