Closed Jaymon closed 1 year ago
Ran into this the other day, I needed to check <FIELD_NAME> IS NULL OR <FIELD_NAME> >= ?.
<FIELD_NAME> IS NULL OR <FIELD_NAME> >= ?
A good syntax for this would be:
Foo.query.or_bar("<VALUE_1>", "<VALUE_2>")
Which would result in:
(bar = '<VALUE_1>' OR bar = '<VALUE_2>')
But that can also just be done with in, and I need support for other operators, I've thought about something like:
in
Foo.query.or_bar( Foo.query.is_bar("<VALUE_1>"), Foo.query.gte_bar("<VALUE_2>") )
Which works but is verbose. The queries passed into the or_bar method would only have their where_fields used.
or_bar
where_fields
Ran into this the other day, I needed to check
<FIELD_NAME> IS NULL OR <FIELD_NAME> >= ?
.A good syntax for this would be:
Which would result in:
But that can also just be done with
in
, and I need support for other operators, I've thought about something like:Which works but is verbose. The queries passed into the
or_bar
method would only have theirwhere_fields
used.