#[non_exhaustive]pub enum MutationOperation {
Insert {
table: String,
},
Update {
table: String,
},
Delete {
table: String,
},
Custom,
}Expand description
Mutation operation types.
This enum describes what kind of database operation a mutation performs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Insert
INSERT into a table.
Update
UPDATE a table.
Delete
DELETE from a table.
Custom
Custom mutation (for complex operations).
Implementations§
Source§impl MutationOperation
impl MutationOperation
Sourcepub const fn kind_str(&self) -> &'static str
pub const fn kind_str(&self) -> &'static str
Return a lowercase string label for the operation kind.
Used in structured audit log events to identify the DML type.
§Example
use fraiseql_core::schema::MutationOperation;
assert_eq!(MutationOperation::Insert { table: "users".into() }.kind_str(), "insert");
assert_eq!(MutationOperation::Update { table: "users".into() }.kind_str(), "update");
assert_eq!(MutationOperation::Delete { table: "users".into() }.kind_str(), "delete");
assert_eq!(MutationOperation::Custom.kind_str(), "custom");Trait Implementations§
Source§impl Clone for MutationOperation
impl Clone for MutationOperation
Source§fn clone(&self) -> MutationOperation
fn clone(&self) -> MutationOperation
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 MutationOperation
impl Debug for MutationOperation
Source§impl Default for MutationOperation
impl Default for MutationOperation
Source§fn default() -> MutationOperation
fn default() -> MutationOperation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MutationOperation
impl<'de> Deserialize<'de> for MutationOperation
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 MutationOperation
impl PartialEq for MutationOperation
Source§fn eq(&self, other: &MutationOperation) -> bool
fn eq(&self, other: &MutationOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MutationOperation
impl Serialize for MutationOperation
impl Eq for MutationOperation
impl StructuralPartialEq for MutationOperation
Auto Trait Implementations§
impl Freeze for MutationOperation
impl RefUnwindSafe for MutationOperation
impl Send for MutationOperation
impl Sync for MutationOperation
impl Unpin for MutationOperation
impl UnsafeUnpin for MutationOperation
impl UnwindSafe for MutationOperation
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.