roboto.query.conditions#
Module Contents#
- class roboto.query.conditions.Comparator#
Bases:
str
,enum.Enum
The comparator to use when comparing a field to a value.
- BeginsWith = 'BEGINS_WITH'#
- Contains = 'CONTAINS'#
- Equals = 'EQUALS'#
- Exists = 'EXISTS'#
- GreaterThan = 'GREATER_THAN'#
- GreaterThanOrEqual = 'GREATER_THAN_OR_EQUAL'#
- IsNotNull = 'IS_NOT_NULL'#
- IsNull = 'IS_NULL'#
- LessThan = 'LESS_THAN'#
- LessThanOrEqual = 'LESS_THAN_OR_EQUAL'#
- Like = 'LIKE'#
- NotContains = 'NOT_CONTAINS'#
- NotEquals = 'NOT_EQUALS'#
- NotExists = 'NOT_EXISTS'#
- NotLike = 'NOT_LIKE'#
- static from_string(value)#
- Parameters:
value (str)
- Return type:
- to_compact_string()#
- class roboto.query.conditions.Condition(/, **data)#
Bases:
pydantic.BaseModel
A filter for any arbitrary attribute for a Roboto resource.
- Parameters:
data (Any)
- comparator: Comparator#
- classmethod equals_cond(field, value)#
- Parameters:
field (str)
value (ConditionValue)
- Return type:
- field: str#
- matches(target)#
- Parameters:
target (dict)
- Return type:
bool
- value: ConditionValue = None#
- class roboto.query.conditions.ConditionGroup(/, **data)#
Bases:
pydantic.BaseModel
A group of conditions that are combined together.
- Parameters:
data (Any)
- static and_group(*conditions)#
- Parameters:
conditions (Union[Condition, ConditionGroup])
- Return type:
- conditions: collections.abc.Sequence[Condition | ConditionGroup]#
- matches(target)#
- Parameters:
target (dict)
- operator: ConditionOperator#
- static or_group(*conditions)#
- Parameters:
conditions (Union[Condition, ConditionGroup])
- Return type:
- validate_conditions(v)#
- Parameters:
v (collections.abc.Sequence[Union[Condition, ConditionGroup]])
- class roboto.query.conditions.ConditionOperator#
Bases:
str
,enum.Enum
The operator to use when combining multiple conditions.
- And = 'AND'#
- Not = 'NOT'#
- Or = 'OR'#
- static from_string(value)#
- Parameters:
value (str)
- Return type:
- roboto.query.conditions.ConditionType#
- roboto.query.conditions.ConditionValue#