pub struct Search { /* private fields */ }
Expand description
For recursive WithQuery WithClauses the traversing order can be specified in some databases that support this functionality.
The clause contains the type of traversal: SearchOrder and the expression that is used to construct the current path.
A query can have both SEARCH and CYCLE clauses.
Setting Self::order and Self::expr is mandatory. The SelectExpr used must specify an alias which will be the name that you can use to order the result of the CommonTableExpression.
Implementations
sourceimpl Search
impl Search
sourcepub fn new_from_order_and_expr<EXPR>(order: SearchOrder, expr: EXPR) -> Self where
EXPR: Into<SelectExpr>,
pub fn new_from_order_and_expr<EXPR>(order: SearchOrder, expr: EXPR) -> Self where
EXPR: Into<SelectExpr>,
Create a complete Search specification from the SearchOrder and a SelectExpr. The given SelectExpr must have an alias specified.
sourcepub fn order(&mut self, order: SearchOrder) -> &mut Self
pub fn order(&mut self, order: SearchOrder) -> &mut Self
The traversal order to be used.
sourcepub fn expr<EXPR>(&mut self, expr: EXPR) -> &mut Self where
EXPR: Into<SelectExpr>,
pub fn expr<EXPR>(&mut self, expr: EXPR) -> &mut Self where
EXPR: Into<SelectExpr>,
The given SelectExpr must have an alias specified.
The actual expression will be the one used to track the path in the graph.
The alias of the given SelectExpr will be the name of the order column generated by this clause.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Search
impl Send for Search
impl Sync for Search
impl Unpin for Search
impl !UnwindSafe for Search
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more