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§
source§impl Search
impl Search
sourcepub fn new_from_order_and_expr<EXPR>(order: SearchOrder, expr: EXPR) -> Selfwhere
EXPR: Into<SelectExpr>,
pub fn new_from_order_and_expr<EXPR>(order: SearchOrder, expr: EXPR) -> Selfwhere
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 Selfwhere
EXPR: Into<SelectExpr>,
pub fn expr<EXPR>(&mut self, expr: EXPR) -> &mut Selfwhere
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§
impl StructuralPartialEq for Search
Auto Trait Implementations§
impl Freeze for Search
impl !RefUnwindSafe for Search
impl Send for Search
impl Sync for Search
impl Unpin for Search
impl !UnwindSafe for Search
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)