obelisk.types.core.Comparison¶
- class obelisk.types.core.Comparison(left: str, right: Any, op: str)[source]¶
Bases:
object
Comparisons are the basic items of a
Filter
. They consist of a field name, operator, and possibly a value on the right.It is strongly suggested you create comparisons by using the staticmethods on this class, rather than trying to construct them yourselves.
When serializing to RSQL format, each argument is single quoted as to accept any otherwise reserved characters, and serialised using
str()
.Methods
- classmethod equal(left: str, right: Any) Comparison [source]¶
- classmethod greater(left: str, right: Any) Comparison [source]¶
- classmethod greater_equal(left: str, right: Any) Comparison [source]¶
- classmethod less(left: str, right: Any) Comparison [source]¶
- classmethod less_equal(left: str, right: Any) Comparison [source]¶
- classmethod not_equal(left: str, right: Any) Comparison [source]¶
- classmethod not_null(left: str) Comparison [source]¶
- classmethod null(left: str) Comparison [source]¶
Attributes