Syntax#
This reference page describes all building blocks of the Intermediate Query Language (IQL).
dbally.iql.syntax.Node
#
Base class for all nodes in the IQL.
dbally.iql.syntax.FunctionCall
dataclass
#
Bases: Node
Represents a call to a function. Is composed of a function name and a list of arguments.
dbally.iql.syntax.BoolOp
#
Bases: Node
Base class for boolean operator nodes.
is_bool_op
#
Checks if node is a boolean operation.
RETURNS | DESCRIPTION |
---|---|
IsBoolOpType
|
True if the node is a boolean operation, otherwise False. |
is_function_call
#
Checks if node is a function call.
RETURNS | DESCRIPTION |
---|---|
IsFunctionCallType
|
True if the node is a function call, otherwise False. |
match
#
Match syntax for convenient query building based on BoolOp type.
PARAMETER | DESCRIPTION |
---|---|
not_ |
Callable executed when node is Not
TYPE:
|
and_ |
Callable executed when node is And
TYPE:
|
or_ |
Callable executed when node is Or
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
Result of chosen callable. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
if node is not of any supported boolean types |
Source code in src/dbally/iql/syntax.py
dbally.iql.syntax.And
dataclass
#
And(children: List[Node])
Bases: BoolOp
And operator which may contain any number of children nodes. Returns True if all children are true.
is_bool_op
#
Checks if node is a boolean operation.
RETURNS | DESCRIPTION |
---|---|
IsBoolOpType
|
True if the node is a boolean operation, otherwise False. |
is_function_call
#
Checks if node is a function call.
RETURNS | DESCRIPTION |
---|---|
IsFunctionCallType
|
True if the node is a function call, otherwise False. |
match
#
Match syntax for convenient query building based on BoolOp type.
PARAMETER | DESCRIPTION |
---|---|
not_ |
Callable executed when node is Not
TYPE:
|
and_ |
Callable executed when node is And
TYPE:
|
or_ |
Callable executed when node is Or
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
Result of chosen callable. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
if node is not of any supported boolean types |
Source code in src/dbally/iql/syntax.py
dbally.iql.syntax.Or
dataclass
#
Or(children: List[Node])
Bases: BoolOp
Or operator which may contain any number of children nodes. Returns True if any child is true.
is_bool_op
#
Checks if node is a boolean operation.
RETURNS | DESCRIPTION |
---|---|
IsBoolOpType
|
True if the node is a boolean operation, otherwise False. |
is_function_call
#
Checks if node is a function call.
RETURNS | DESCRIPTION |
---|---|
IsFunctionCallType
|
True if the node is a function call, otherwise False. |
match
#
Match syntax for convenient query building based on BoolOp type.
PARAMETER | DESCRIPTION |
---|---|
not_ |
Callable executed when node is Not
TYPE:
|
and_ |
Callable executed when node is And
TYPE:
|
or_ |
Callable executed when node is Or
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
Result of chosen callable. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
if node is not of any supported boolean types |
Source code in src/dbally/iql/syntax.py
dbally.iql.syntax.Not
dataclass
#
Not(child: Node)
Bases: BoolOp
Not operator, contains only one children node. Inverts result of boolean operation.
is_bool_op
#
Checks if node is a boolean operation.
RETURNS | DESCRIPTION |
---|---|
IsBoolOpType
|
True if the node is a boolean operation, otherwise False. |
is_function_call
#
Checks if node is a function call.
RETURNS | DESCRIPTION |
---|---|
IsFunctionCallType
|
True if the node is a function call, otherwise False. |
match
#
Match syntax for convenient query building based on BoolOp type.
PARAMETER | DESCRIPTION |
---|---|
not_ |
Callable executed when node is Not
TYPE:
|
and_ |
Callable executed when node is And
TYPE:
|
or_ |
Callable executed when node is Or
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Any
|
Result of chosen callable. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
if node is not of any supported boolean types |