Beispiel #1
0
def occasions_by_uid(request, uids):
    if not uids:
        return list()
    uids = [ensure_uuid(uid) for uid in uids]
    session = get_session(request)
    return session.query(OccasionRecord)\
                  .filter(OccasionRecord.uid.in_(uids))\
                  .all()
Beispiel #2
0
def facilities_by_uid(request, uids):
    if not uids:
        return list()
    uids = [ensure_uuid(uid) for uid in uids]
    session = get_session(request)
    return session.query(FacilityRecord)\
                  .filter(FacilityRecord.uid.in_(uids))\
                  .all()
Beispiel #3
0
def occasion_by_uid(request, uid):
    session = get_session(request)
    return session.query(OccasionRecord).get(ensure_uuid(uid))
Beispiel #4
0
def facility_by_uid(request, uid):
    session = get_session(request)
    return session.query(FacilityRecord).get(ensure_uuid(uid))
Beispiel #5
0
def category_by_uid(request, uid):
    session = get_session(request)
    return session.query(CategoryRecord).get(ensure_uuid(uid))