pub enum TriggerAction {
ExecuteFunction {
name: String,
args: Vec<String>,
},
InlineSql {
statements: Vec<String>,
},
FunctionReference {
name: String,
},
}Expand description
The action to execute when the trigger fires.
Variants§
ExecuteFunction
Execute a stored function/procedure.
Fields
InlineSql
Execute inline SQL (MySQL style).
FunctionReference
Reference an existing trigger function (PostgreSQL).
Implementations§
Source§impl TriggerAction
impl TriggerAction
Sourcepub fn function_with_args(
name: impl Into<String>,
args: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn function_with_args( name: impl Into<String>, args: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Create an action that executes a function with arguments.
Sourcepub fn inline_sql(
statements: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn inline_sql( statements: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Create an action with inline SQL.
Trait Implementations§
Source§impl Clone for TriggerAction
impl Clone for TriggerAction
Source§fn clone(&self) -> TriggerAction
fn clone(&self) -> TriggerAction
Returns a duplicate of the value. Read more
1.0.0 · 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 TriggerAction
impl Debug for TriggerAction
Source§impl<'de> Deserialize<'de> for TriggerAction
impl<'de> Deserialize<'de> for TriggerAction
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
Source§impl PartialEq for TriggerAction
impl PartialEq for TriggerAction
Source§impl Serialize for TriggerAction
impl Serialize for TriggerAction
impl Eq for TriggerAction
impl StructuralPartialEq for TriggerAction
Auto Trait Implementations§
impl Freeze for TriggerAction
impl RefUnwindSafe for TriggerAction
impl Send for TriggerAction
impl Sync for TriggerAction
impl Unpin for TriggerAction
impl UnwindSafe for TriggerAction
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