pub struct TriggerExecutor;Expand description
Executor for trigger DDL operations
Implementations§
Source§impl TriggerExecutor
impl TriggerExecutor
Sourcepub fn create_trigger(
db: &mut Database,
stmt: &CreateTriggerStmt,
) -> Result<String, ExecutorError>
pub fn create_trigger( db: &mut Database, stmt: &CreateTriggerStmt, ) -> Result<String, ExecutorError>
Execute a CREATE TRIGGER statement.
This is a convenience wrapper around TriggerExecutor::create_trigger_with_sql
that does not preserve the original SQL text. Triggers created via this path
will not survive SQL-dump persistence round-trips.
Sourcepub fn create_trigger_with_sql(
db: &mut Database,
stmt: &CreateTriggerStmt,
original_sql: Option<&str>,
) -> Result<String, ExecutorError>
pub fn create_trigger_with_sql( db: &mut Database, stmt: &CreateTriggerStmt, original_sql: Option<&str>, ) -> Result<String, ExecutorError>
Execute a CREATE TRIGGER statement, optionally preserving the original SQL text for SQL-dump persistence.
When original_sql is Some, the SQL is stored on the catalog
TriggerDefinition so it can be re-emitted verbatim by save_sql_dump.
This is the path used by the CLI / Python / WASM frontends, which are the
only callers that have access to the original textual SQL.
Sourcepub fn alter_trigger(
db: &mut Database,
stmt: &AlterTriggerStmt,
) -> Result<String, ExecutorError>
pub fn alter_trigger( db: &mut Database, stmt: &AlterTriggerStmt, ) -> Result<String, ExecutorError>
Execute an ALTER TRIGGER statement
Sourcepub fn drop_trigger(
db: &mut Database,
stmt: &DropTriggerStmt,
) -> Result<String, ExecutorError>
pub fn drop_trigger( db: &mut Database, stmt: &DropTriggerStmt, ) -> Result<String, ExecutorError>
Execute a DROP TRIGGER statement
Auto Trait Implementations§
impl Freeze for TriggerExecutor
impl RefUnwindSafe for TriggerExecutor
impl Send for TriggerExecutor
impl Sync for TriggerExecutor
impl Unpin for TriggerExecutor
impl UnsafeUnpin for TriggerExecutor
impl UnwindSafe for TriggerExecutor
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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