pub enum BatchOperation {
Insert {
table: String,
data: HashMap<String, FilterValue>,
},
Update {
table: String,
filter: HashMap<String, FilterValue>,
data: HashMap<String, FilterValue>,
},
Delete {
table: String,
filter: HashMap<String, FilterValue>,
},
Raw {
sql: String,
params: Vec<FilterValue>,
},
}Expand description
A single operation in a batch.
Variants§
Insert
An INSERT operation.
Update
An UPDATE operation.
Fields
§
filter: HashMap<String, FilterValue>The filter for which rows to update.
§
data: HashMap<String, FilterValue>The data to update.
Delete
A DELETE operation.
Fields
§
filter: HashMap<String, FilterValue>The filter for which rows to delete.
Raw
A raw SQL operation.
Implementations§
Source§impl BatchOperation
impl BatchOperation
Sourcepub fn insert(
table: impl Into<String>,
data: HashMap<String, FilterValue>,
) -> Self
pub fn insert( table: impl Into<String>, data: HashMap<String, FilterValue>, ) -> Self
Create an INSERT operation.
Sourcepub fn update(
table: impl Into<String>,
filter: HashMap<String, FilterValue>,
data: HashMap<String, FilterValue>,
) -> Self
pub fn update( table: impl Into<String>, filter: HashMap<String, FilterValue>, data: HashMap<String, FilterValue>, ) -> Self
Create an UPDATE operation.
Trait Implementations§
Source§impl Clone for BatchOperation
impl Clone for BatchOperation
Source§fn clone(&self) -> BatchOperation
fn clone(&self) -> BatchOperation
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 moreAuto Trait Implementations§
impl Freeze for BatchOperation
impl RefUnwindSafe for BatchOperation
impl Send for BatchOperation
impl Sync for BatchOperation
impl Unpin for BatchOperation
impl UnwindSafe for BatchOperation
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