pub enum SourcePlan {
Table {
name: String,
qualifier: String,
alias: Option<String>,
column_aliases: Vec<String>,
bound_columns: Option<Vec<String>>,
include_descendants: bool,
},
Join {
left: Box<SourcePlan>,
right: Box<SourcePlan>,
kind: JoinKind,
on: Option<ScalarExpr>,
using: Option<JoinUsing>,
natural: bool,
alias: Option<String>,
column_aliases: Vec<String>,
lateral: bool,
strategy: JoinExecutionStrategy,
},
Values {
rows: Vec<Vec<ScalarExpr>>,
alias: Option<String>,
column_aliases: Vec<String>,
internal_relation: Option<InternalRelationId>,
internal_column_types: Vec<Option<ColumnType>>,
},
Function {
name: String,
binding: Option<FunctionBinding>,
output_name: String,
relations: Option<OperatorJoinRelations>,
args: Vec<ScalarExpr>,
alias: Option<String>,
column_aliases: Vec<String>,
ordinality: bool,
column_types: Vec<String>,
},
FunctionGroup {
functions: Vec<TableFunctionPlan>,
alias: Option<String>,
column_aliases: Vec<String>,
ordinality: bool,
},
Subquery {
body: Box<QueryPlan>,
alias: Option<String>,
column_aliases: Vec<String>,
},
}Expand description
The row-producing source below a query block.
Variants§
Table
Fields
Join
Fields
§
left: Box<SourcePlan>§
right: Box<SourcePlan>§
on: Option<ScalarExpr>§
strategy: JoinExecutionStrategyValues
Function
Fields
§
binding: Option<FunctionBinding>§
relations: Option<OperatorJoinRelations>§
args: Vec<ScalarExpr>FunctionGroup
Fields
§
functions: Vec<TableFunctionPlan>Subquery
Implementations§
Source§impl SourcePlan
impl SourcePlan
Sourcepub fn visible_qualifier(&self) -> Option<&str>
pub fn visible_qualifier(&self) -> Option<&str>
SQL-visible relation qualifier for a non-join FROM item. PostgreSQL uses the local function name, not its schema-qualified lookup identity, when a table function has no explicit alias.
Sourcepub fn push_expressions<'a>(&'a self, output: &mut Vec<&'a ScalarExpr>)
pub fn push_expressions<'a>(&'a self, output: &mut Vec<&'a ScalarExpr>)
Append scalar inputs owned by this source, including JOIN predicates; nested query bodies retain their own expression scope.
pub fn collect_tables(&self, output: &mut Vec<(String, Option<String>)>)
Source§impl SourcePlan
impl SourcePlan
Sourcepub fn visit_scalar_expressions(&self, visit: &mut dyn FnMut(&ScalarExpr))
pub fn visit_scalar_expressions(&self, visit: &mut dyn FnMut(&ScalarExpr))
Visit every scalar expression this source owns, each root once: join conditions, VALUES rows, function arguments and the expressions of the query bodies nested in derived tables.
Trait Implementations§
Source§impl Clone for SourcePlan
impl Clone for SourcePlan
Source§impl Debug for SourcePlan
impl Debug for SourcePlan
Source§impl<'de> Deserialize<'de> for SourcePlan
impl<'de> Deserialize<'de> for SourcePlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SourcePlan
impl RefUnwindSafe for SourcePlan
impl Send for SourcePlan
impl Sync for SourcePlan
impl Unpin for SourcePlan
impl UnsafeUnpin for SourcePlan
impl UnwindSafe for SourcePlan
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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