Пример #1
0
def search_references(query):
    # {"rec_id": {"$in": rec_ids}}
    return metajson_service.load_dict_list(mongodb[config["referencesCol"]].find(query))
Пример #2
0
def get_references_by_rec_ids(rec_ids):
    return metajson_service.load_dict_list(mongodb[config["referencesCol"]].find({"rec_id": {"$in": rec_ids}}))
Пример #3
0
def get_references():
    return metajson_service.load_dict_list(mongodb[config["referencesCol"]].find())
Пример #4
0
def get_references_by_mongo_ids(mongo_ids):
    mongo_object_ids = []
    for mongo_id in mongo_ids:
        mongo_object_ids.append(ObjectId(mongo_id))
    return metajson_service.load_dict_list(mongodb[config["referencesCol"]].find({"_id": {"$in": mongo_object_ids}}))