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
sourceimpl Cycle
impl Cycle
sourcepub 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.
sourcepub fn expr<EXPR>(&mut self, expr: EXPR) -> &mut Self where
EXPR: Into<SimpleExpr>,
pub fn expr<EXPR>(&mut self, expr: EXPR) -> &mut Self where
EXPR: Into<SimpleExpr>,
The expression identifying nodes.
sourcepub fn set<ID>(&mut self, set: ID) -> &mut Self where
ID: IntoIden,
pub fn set<ID>(&mut self, set: ID) -> &mut Self where
ID: IntoIden,
The name of the boolean column containing whether we have completed a cycle or not yet generated by this clause.
sourcepub fn using<ID>(&mut self, using: ID) -> &mut Self where
ID: IntoIden,
pub fn using<ID>(&mut self, using: ID) -> &mut Self where
ID: IntoIden,
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 Send for Cycle
impl Sync for Cycle
impl Unpin for Cycle
impl !UnwindSafe for Cycle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more