Skip to content

Commit

Permalink
temporarily fixes #159
Browse files Browse the repository at this point in the history
  • Loading branch information
aaarendt committed Nov 25, 2024
1 parent f8b31ab commit 89ef9c5
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions snowexsql/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,24 @@ def extend_qry(cls, qry, check_size=True, **kwargs):
# Filter boundary
if "_greater_equal" in k:
key = k.split("_greater_equal")[0]
qry = qry.filter(
cast(getattr(qry_model, key), Numeric) >= v
)
if key == "value":
qry = qry.filter(
cast(getattr(qry_model, key), Numeric) >= v
)
else:
qry = qry.filter(
getattr(qry_model, key) >= v
)
elif "_less_equal" in k:
key = k.split("_less_equal")[0]
qry = qry.filter(
cast(getattr(qry_model, key), Numeric) <= v
)
if key == "value":
qry = qry.filter(
cast(getattr(qry_model, key), Numeric) <= v
)
else:
qry = qry.filter(
getattr(qry_model, key) <= v
)
# Filter linked columns
elif k == "instrument":
qry = cls._filter_instrument(qry, v)
Expand Down

0 comments on commit 89ef9c5

Please sign in to comment.