def rel_query(rel, thing_id, name, filters=[]):
 q = rel._query((rel.c._thing1_id == thing_id), (rel.c._t2_deleted == False), (rel.c._name == name), sort=desc('_date'), eager_load=True)
 if filters:
  q._filter(*filters)
 return q

def rel_query ( rel , thing_id , name , filters = [ ] ) : q = rel . _query ( ( rel . c . _thing1_id == thing_id ) , ( rel . c . _t2_deleted == False ) , ( rel . c . _name == name ) , sort = desc ( '_date' ) , eager_load = True ) if filters : q . _filter ( * filters ) return q
general relationship query .