예제 #1
0
파일: manage.py 프로젝트: renesugar/aleph
def flushentities(foreign_id):
    """Delete all entities from given collection."""
    collection = Collection.by_foreign_id(foreign_id)
    if collection is None:
        raise ValueError("No such collection: %r" % foreign_id)
    delete_entities(collection.id)
    db.session.commit()
예제 #2
0
def flushentities(foreign_id):
    """Delete all entities from given collection."""
    collection = get_collection(foreign_id)
    delete_entities(collection.id)
    db.session.commit()