def query_from_strings(query_cls, model_cls, prefixes, query_parts):
 subqueries = []
 for part in query_parts:
  subqueries.append(construct_query_part(model_cls, prefixes, part))
 if (not subqueries):
  subqueries = [query.TrueQuery()]
 return query_cls(subqueries)

def query_from_strings ( query_cls , model_cls , prefixes , query_parts ) : subqueries = [ ] for part in query_parts : subqueries . append ( construct_query_part ( model_cls , prefixes , part ) ) if ( not subqueries ) : subqueries = [ query . TrueQuery ( ) ] return query_cls ( subqueries )
creates a collection query of type query_cls from a list of strings in the format used by parse_query_part .