Conditions

class snuba_sdk.conditions.And(conditions=<factory>)[source]

Bases: snuba_sdk.conditions.BooleanCondition

conditions: Sequence[Union[snuba_sdk.conditions.BooleanCondition, snuba_sdk.conditions.Condition]]
op: snuba_sdk.conditions.BooleanOp = 'AND'
class snuba_sdk.conditions.BooleanCondition(op, conditions)[source]

Bases: snuba_sdk.expressions.Expression

conditions: Sequence[Union[snuba_sdk.conditions.BooleanCondition, snuba_sdk.conditions.Condition]]
op: snuba_sdk.conditions.BooleanOp
validate()[source]
Return type

None

class snuba_sdk.conditions.BooleanOp(value)[source]

Bases: enum.Enum

An enumeration.

AND = 'AND'
OR = 'OR'
class snuba_sdk.conditions.Condition(lhs, op, rhs=None)[source]

Bases: snuba_sdk.expressions.Expression

lhs: Union[snuba_sdk.column.Column, snuba_sdk.function.CurriedFunction, snuba_sdk.function.Function]
op: snuba_sdk.conditions.Op
rhs: Union[snuba_sdk.column.Column, snuba_sdk.function.CurriedFunction, snuba_sdk.function.Function, None, bool, str, bytes, float, int, datetime.date, datetime.datetime, Sequence[Union[snuba_sdk.expressions.Expression, None, bool, str, bytes, float, int, datetime.date, datetime.datetime]]] = None
validate()[source]
Return type

None

class snuba_sdk.conditions.ConditionFunction(value)[source]

Bases: enum.Enum

An enumeration.

EQ = 'equals'
GT = 'greater'
GTE = 'greaterOrEquals'
IN = 'in'
IS_NOT_NULL = 'isNotNull'
IS_NULL = 'isNull'
LIKE = 'like'
LT = 'less'
LTE = 'lessOrEquals'
NEQ = 'notEquals'
NOT_IN = 'notIn'
NOT_LIKE = 'notLike'
exception snuba_sdk.conditions.InvalidConditionError[source]

Bases: snuba_sdk.expressions.InvalidExpressionError

class snuba_sdk.conditions.Op(value)[source]

Bases: enum.Enum

An enumeration.

EQ = '='
GT = '>'
GTE = '>='
IN = 'IN'
IS_NOT_NULL = 'IS NOT NULL'
IS_NULL = 'IS NULL'
LIKE = 'LIKE'
LT = '<'
LTE = '<='
NEQ = '!='
NOT_IN = 'NOT IN'
NOT_LIKE = 'NOT LIKE'
class snuba_sdk.conditions.Or(conditions=<factory>)[source]

Bases: snuba_sdk.conditions.BooleanCondition

conditions: Sequence[Union[snuba_sdk.conditions.BooleanCondition, snuba_sdk.conditions.Condition]]
op: snuba_sdk.conditions.BooleanOp = 'OR'
snuba_sdk.conditions.get_first_level_and_conditions(conditions)[source]
Return type

Sequence[Union[BooleanCondition, Condition]]

snuba_sdk.conditions.is_unary(op)[source]
Return type

bool