pub enum CommandPlan {
Show 64 variants
CreateTable(Box<CreateTable>),
CreateTableIfNotExists(DeferredCreateTable),
CreateIndex(CreateIndex),
Insert(Box<InsertPlan>),
Update(Box<UpdatePlan>),
Delete(Box<DeletePlan>),
Drop(DropStmt),
AlterTable(Box<AlterTableStmt>),
AlterView(AlterViewStmt),
CreateView {
name: String,
column_names: Vec<String>,
query: Box<QueryPlan>,
or_replace: bool,
persistence: RelationPersistence,
options: Vec<(String, String)>,
},
CreateMaterializedView {
name: String,
column_names: Vec<String>,
if_not_exists: bool,
with_no_data: bool,
options: Vec<(String, String)>,
query: Box<QueryPlan>,
},
RefreshMaterializedView {
name: String,
concurrently: bool,
with_no_data: bool,
},
CreateSchema {
name: Option<String>,
if_not_exists: bool,
authorization: Option<SchemaAuthorization>,
},
AlterSchemaOwner {
name: String,
new_owner: String,
},
Notify {
channel: String,
payload: String,
},
Listen {
channel: String,
},
Unlisten {
channel: Option<String>,
},
SetVariable {
name: String,
value: String,
local: bool,
is_default: bool,
},
ResetVariable {
name: String,
},
ResetAllVariables,
SetConstraints {
constraints: Vec<SetConstraintName>,
deferred: bool,
},
ShowVariable {
name: String,
},
Discard {
target: DiscardTarget,
},
Load {
library: String,
},
Explain {
analyze: bool,
verbose: bool,
format: Option<String>,
body: Box<UnifiedPlan>,
},
Analyze {
table: Option<String>,
},
Vacuum(VacuumStmt),
Truncate {
tables: Vec<TruncateTarget>,
cascade: bool,
restart_identity: bool,
},
Transaction(TransactionStmt),
DeclareCursor {
name: String,
binary: bool,
scroll: Option<bool>,
hold: bool,
query: Box<QueryPlan>,
},
FetchCursor(FetchCursorStmt),
CloseCursor {
name: Option<String>,
},
CreateSequence(CreateSequence),
CreateDomain(CreateDomain),
AlterSequence(AlterSequence),
CreateTableAs {
name: String,
if_not_exists: bool,
column_names: Vec<String>,
with_no_data: bool,
persistence: RelationPersistence,
on_commit: OnCommitAction,
query: Box<QueryPlan>,
},
Prepare {
name: String,
parameter_types: Vec<ColumnType>,
body: Box<UnifiedPlan>,
},
Execute {
name: String,
params: Vec<ExpressionPlan>,
},
Deallocate {
name: Option<String>,
},
CreateForeignServer(CreateForeignServer),
CreateForeignTable(CreateForeignTable),
CreateForeignTableIfNotExists(DeferredCreateForeignTable),
AlterForeignTable(AlterForeignTableStmt),
Merge(Box<MergePlan>),
CreateFunction(Box<CreateFunction>),
DropFunction(DropFunctionStmt),
AlterRoutine(AlterRoutineStmt),
AlterRoutineOwner(AlterRoutineOwnerStmt),
RenameRoutine(RenameRoutineStmt),
GrantRoutine(GrantRoutineStmt),
GrantTable(GrantTableStmt),
GrantSequence(GrantSequenceStmt),
GrantDatabase(GrantDatabaseStmt),
GrantSchema(GrantSchemaStmt),
GrantRole(GrantRoleStmt),
CreateRole(CreateRoleStmt),
AlterRole(AlterRoleStmt),
DropRole(DropRoleStmt),
CreateTrigger(CreateTrigger),
DropTrigger(DropTrigger),
CreateRule(CreateRule),
DropRule(DropRule),
DoBlock {
language: String,
body: String,
},
Call {
name: String,
args: Vec<ExpressionPlan>,
},
}Expand description
Non-query statement plans. Mutations own physical sources and scalar IR; query-bearing catalog commands own explicit query children. Typed DDL and procedural payloads contain catalog data, never a second SQL dispatcher.
Variants§
CreateTable(Box<CreateTable>)
CreateTableIfNotExists(DeferredCreateTable)
CreateIndex(CreateIndex)
Insert(Box<InsertPlan>)
Update(Box<UpdatePlan>)
Delete(Box<DeletePlan>)
Drop(DropStmt)
AlterTable(Box<AlterTableStmt>)
AlterView(AlterViewStmt)
CreateView
Fields
§
persistence: RelationPersistenceCreateMaterializedView
Fields
RefreshMaterializedView
CreateSchema
AlterSchemaOwner
Notify
Listen
Unlisten
SetVariable
ResetVariable
ResetAllVariables
SetConstraints
ShowVariable
Discard
Fields
§
target: DiscardTargetLoad
Explain
Analyze
Vacuum(VacuumStmt)
Truncate
Transaction(TransactionStmt)
DeclareCursor
FetchCursor(FetchCursorStmt)
CloseCursor
CreateSequence(CreateSequence)
CreateDomain(CreateDomain)
AlterSequence(AlterSequence)
CreateTableAs
Prepare
Execute
Deallocate
CreateForeignServer(CreateForeignServer)
CreateForeignTable(CreateForeignTable)
CreateForeignTableIfNotExists(DeferredCreateForeignTable)
AlterForeignTable(AlterForeignTableStmt)
Merge(Box<MergePlan>)
CreateFunction(Box<CreateFunction>)
DropFunction(DropFunctionStmt)
AlterRoutine(AlterRoutineStmt)
AlterRoutineOwner(AlterRoutineOwnerStmt)
RenameRoutine(RenameRoutineStmt)
GrantRoutine(GrantRoutineStmt)
GrantTable(GrantTableStmt)
GrantSequence(GrantSequenceStmt)
GrantDatabase(GrantDatabaseStmt)
GrantSchema(GrantSchemaStmt)
GrantRole(GrantRoleStmt)
CreateRole(CreateRoleStmt)
AlterRole(AlterRoleStmt)
DropRole(DropRoleStmt)
CreateTrigger(CreateTrigger)
DropTrigger(DropTrigger)
CreateRule(CreateRule)
DropRule(DropRule)
DoBlock
Call
Implementations§
Source§impl CommandPlan
impl CommandPlan
pub fn ctes_mut(&mut self) -> Option<&mut Vec<CtePlan>>
Sourcepub fn query_inputs(&self) -> Vec<&QueryPlan>
pub fn query_inputs(&self) -> Vec<&QueryPlan>
Query children evaluated in the command’s WITH scope, including every scalar_subqueries entry. Source-plan subqueries are owned by source_input; visitors should not traverse scalar_subqueries separately.
pub fn query_inputs_mut(&mut self) -> Vec<&mut QueryPlan>
pub fn source_input(&self) -> Option<&SourcePlan>
pub fn source_input_mut(&mut self) -> Option<&mut SourcePlan>
pub fn mutation_target(&self) -> Option<&str>
pub fn mutation_target_mut(&mut self) -> Option<&mut String>
pub fn returning(&self) -> Option<&[ProjectionPlan]>
Source§impl CommandPlan
impl CommandPlan
Sourcepub fn expressions(&self) -> Vec<&ScalarExpr>
pub fn expressions(&self) -> Vec<&ScalarExpr>
Scalar expressions owned by the command, excluding its relational children.
Sourcepub fn expressions_mut(&mut self) -> Vec<&mut ScalarExpr>
pub fn expressions_mut(&mut self) -> Vec<&mut ScalarExpr>
Scalar expressions owned by the command, excluding its relational children.
pub fn scalar_subqueries(&self) -> &[QueryPlan]
pub fn target_qualifier(&self) -> Option<&str>
pub fn returning_aliases(&self) -> Option<&ReturningAliases>
Trait Implementations§
Source§impl Clone for CommandPlan
impl Clone for CommandPlan
Source§fn clone(&self) -> CommandPlan
fn clone(&self) -> CommandPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandPlan
impl Debug for CommandPlan
Source§impl<'de> Deserialize<'de> for CommandPlan
impl<'de> Deserialize<'de> for CommandPlan
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 CommandPlan
impl RefUnwindSafe for CommandPlan
impl Send for CommandPlan
impl Sync for CommandPlan
impl Unpin for CommandPlan
impl UnsafeUnpin for CommandPlan
impl UnwindSafe for CommandPlan
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