pub struct RecursiveQuery {
pub name: String,
pub static_term: Arc<LogicalPlan>,
pub recursive_term: Arc<LogicalPlan>,
pub is_distinct: bool,
}
Expand description
A variadic query operation, Recursive CTE.
§Recursive Query Evaluation
From the Postgres Docs:
-
Evaluate the non-recursive term. For
UNION
(but notUNION ALL
), discard duplicate rows. Include all remaining rows in the result of the recursive query, and also place them in a temporary working table. -
So long as the working table is not empty, repeat these steps:
-
Evaluate the recursive term, substituting the current contents of the working table for the recursive self-reference. For
UNION
(but notUNION ALL
), discard duplicate rows and rows that duplicate any previous result row. Include all remaining rows in the result of the recursive query, and also place them in a temporary intermediate table. -
Replace the contents of the working table with the contents of the intermediate table, then empty the intermediate table.
Fields§
§name: String
Name of the query
static_term: Arc<LogicalPlan>
The static term (initial contents of the working table)
recursive_term: Arc<LogicalPlan>
The recursive term (evaluated on the contents of the working table until it returns an empty set)
is_distinct: bool
Should the output of the recursive term be deduplicated (UNION
) or
not (UNION ALL
).
Trait Implementations§
Source§impl Clone for RecursiveQuery
impl Clone for RecursiveQuery
Source§fn clone(&self) -> RecursiveQuery
fn clone(&self) -> RecursiveQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RecursiveQuery
impl Debug for RecursiveQuery
Source§impl Hash for RecursiveQuery
impl Hash for RecursiveQuery
Source§impl PartialEq for RecursiveQuery
impl PartialEq for RecursiveQuery
Source§impl PartialOrd for RecursiveQuery
impl PartialOrd for RecursiveQuery
impl Eq for RecursiveQuery
impl StructuralPartialEq for RecursiveQuery
Auto Trait Implementations§
impl Freeze for RecursiveQuery
impl !RefUnwindSafe for RecursiveQuery
impl Send for RecursiveQuery
impl Sync for RecursiveQuery
impl Unpin for RecursiveQuery
impl !UnwindSafe for RecursiveQuery
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
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more