pub struct LogicPath { /* private fields */ }Expand description
Encodes information on how the syntax tree below a given query is structured.
This way it is possible to optimize queries on the condition of a specific tree structure.
An example would be turning a subquery into a JOIN or IN given a plain AND or OR structure.
This struct itself is not mutable, it can only generate copies of itself with the given operation appended through the and, or and not methods.
Implementations§
Source§impl LogicPath
impl LogicPath
Sourcepub fn is_root(&self) -> bool
pub fn is_root(&self) -> bool
Returns wheter this struct represents the root node of a logic path
Sourcepub fn is_plain_and(&self) -> bool
pub fn is_plain_and(&self) -> bool
Wheter the logic path is made up of only AND connections without any inversions.
Sourcepub fn is_plain_or(&self) -> bool
pub fn is_plain_or(&self) -> bool
Wheter the logic_path is made up of only OR connections without any inversions.
Sourcepub fn is_excluding(&self) -> bool
pub fn is_excluding(&self) -> bool
Returns the parity of all inversions so far and returns true for an uneven amount of inversions.
This can be used to determine wheter a match of the query could include or exclude an item.
Sourcepub fn is_branch_inverted(&self) -> bool
pub fn is_branch_inverted(&self) -> bool
Returns wheter there has been an uneven amount of inversions since the last AND or OR statement.