pub enum Operation {
Insert(Insert),
DeleteByKey(DeleteByKey),
FindPkByIndex(FindPkByIndex),
GetByKey(GetByKey),
QueryPk(QueryPk),
QuerySql(QuerySql),
Transaction(Transaction),
UpdateByKey(UpdateByKey),
}Variants§
Insert(Insert)
Create a new record. This will always be a lowered stmt::Insert
DeleteByKey(DeleteByKey)
Delete records identified by the given keys.
FindPkByIndex(FindPkByIndex)
Find by index
GetByKey(GetByKey)
Get one or more records by the primary key
QueryPk(QueryPk)
Query the table, filtering by the primary key
QuerySql(QuerySql)
Execute a SQL query
Transaction(Transaction)
Execute a transaction lifecycle op
UpdateByKey(UpdateByKey)
Update a record by the primary key
Implementations§
Source§impl Operation
impl Operation
Sourcepub fn is_query_sql(&self) -> bool
pub fn is_query_sql(&self) -> bool
Returns true if this is a QuerySql operation.
Source§impl Operation
impl Operation
Sourcepub fn is_transaction_commit(&self) -> bool
pub fn is_transaction_commit(&self) -> bool
Returns true if this is a Transaction::Commit operation.
Trait Implementations§
Source§impl From<DeleteByKey> for Operation
impl From<DeleteByKey> for Operation
Source§fn from(value: DeleteByKey) -> Self
fn from(value: DeleteByKey) -> Self
Converts to this type from the input type.
Source§impl From<FindPkByIndex> for Operation
impl From<FindPkByIndex> for Operation
Source§fn from(value: FindPkByIndex) -> Self
fn from(value: FindPkByIndex) -> Self
Converts to this type from the input type.
Source§impl From<Transaction> for Operation
impl From<Transaction> for Operation
Source§fn from(value: Transaction) -> Self
fn from(value: Transaction) -> Self
Converts to this type from the input type.
Source§impl From<UpdateByKey> for Operation
impl From<UpdateByKey> for Operation
Source§fn from(value: UpdateByKey) -> Self
fn from(value: UpdateByKey) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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