class documentation

Encapsulate filters as objects that can then be combined logically (using `&` and `|`).

Method __and__ Undocumented
Method __init__ Construct a new Node. If no connector is given, use the default.
Method __invert__ Undocumented
Method __or__ Undocumented
Method __xor__ Undocumented
Method check Do a database query to check if the expressions of the Q instance matches against the expressions.
Method deconstruct Undocumented
Method flatten Recursively yield this Q object and all subexpressions, in depth-first order.
Method resolve_expression Undocumented
Constant AND Undocumented
Constant OR Undocumented
Constant XOR Undocumented
Class Variable conditional Undocumented
Method _combine Undocumented

Inherited from Node:

Method __bool__ Return whether or not this node has children.
Method __contains__ Return True if 'other' is a direct child of this instance.
Method __deepcopy__ Undocumented
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __len__ Return the number of children this node has.
Method __repr__ Undocumented
Method __str__ Undocumented
Method add Combine this tree and the data represented by data using the connector conn_type. The combine is done by squashing the node other away if possible.
Method negate Negate the sense of the root connector.
Class Variable default Undocumented
Instance Variable children Undocumented
Instance Variable connector Undocumented
Instance Variable negated Undocumented
Class Method _new_instance Create a new instance of this class when new Nodes (or subclasses) are needed in the internal code in this class. Normally, it just shadows __init__(). However, subclasses with an __init__ signature that aren't an extension of Node...
def __and__(self, other): (source)

Undocumented

def __init__(self, *args, _connector=None, _negated=False, **kwargs): (source)

Construct a new Node. If no connector is given, use the default.

def __invert__(self): (source)

Undocumented

def __or__(self, other): (source)

Undocumented

def __xor__(self, other): (source)

Undocumented

def check(self, against, using=DEFAULT_DB_ALIAS): (source)

Do a database query to check if the expressions of the Q instance matches against the expressions.

def deconstruct(self): (source)

Undocumented

def flatten(self): (source)

Recursively yield this Q object and all subexpressions, in depth-first order.

def resolve_expression(self, query=None, allow_joins=True, reuse=None, summarize=False, for_save=False): (source)

Undocumented

Undocumented

Value
'AND'

Undocumented

Value
'OR'

Undocumented

Value
'XOR'
conditional: bool = (source)

Undocumented

def _combine(self, other, conn): (source)

Undocumented