Merge "Implements in operator for complex query functionality"

This commit is contained in:
Jenkins
2014-02-25 23:39:27 +00:00
committed by Gerrit Code Review
7 changed files with 90 additions and 5 deletions

View File

@@ -180,6 +180,10 @@ def make_query_from_filter(session, query, sample_filter, require_meter=True):
return query
def operator_in(field_name, field_value):
return field_name.in_(field_value)
class Connection(base.Connection):
"""SqlAlchemy connection."""
@@ -190,7 +194,8 @@ class Connection(base.Connection):
"=<": operator.le,
">=": operator.ge,
"=>": operator.ge,
"!=": operator.ne}
"!=": operator.ne,
"in": operator_in}
complex_operators = {"or": or_,
"and": and_}
ordering_functions = {"asc": asc,