pub enum CommandPlan {
Show 62 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: String,
if_not_exists: bool,
},
Notify {
channel: String,
payload: String,
},
Listen {
channel: String,
},
Unlisten {
channel: Option<String>,
},
SetVariable {
name: String,
value: String,
},
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),
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,
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
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)
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§
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 moreAuto 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> 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