pub struct Cycle { /* private fields */ }
Expand description
For recursive WithQuery WithClauses the CYCLE sql clause can be specified to avoid creating an infinite traversals that loops on graph cycles indefinitely. You specify an expression that identifies a node in the graph and that will be used to determine during the iteration of the execution of the query when appending of new values whether the new values are distinct new nodes or are already visited and therefore they should be added again into the result.
A query can have both SEARCH and CYCLE clauses.
Setting Self::set, Self::expr and Self::using is mandatory.
Implementations
pub fn new_from_expr_set_using<EXPR, ID1, ID2>(
expr: EXPR,
set: ID1,
using: ID2
) -> Self where
EXPR: Into<SimpleExpr>,
ID1: IntoIden,
ID2: IntoIden,
pub fn new_from_expr_set_using<EXPR, ID1, ID2>(
expr: EXPR,
set: ID1,
using: ID2
) -> Self where
EXPR: Into<SimpleExpr>,
ID1: IntoIden,
ID2: IntoIden,
Create a complete Search specification from the SearchOrder and a SelectExpr. The given SelectExpr must have an alias specified.
The expression identifying nodes.
The name of the boolean column containing whether we have completed a cycle or not yet generated by this clause.
The name of the array typed column that contains the node ids (generated using the Self::expr) that specify the current nodes path that will be generated by this clause.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Cycle
impl !UnwindSafe for Cycle
Blanket Implementations
Mutably borrows from an owned value. Read more