pub struct DeleteByKey {
pub table: TableId,
pub keys: Vec<Value>,
pub filter: Option<Expr>,
}Expand description
Deletes one or more records from a table by primary key.
Used by key-value drivers (e.g., DynamoDB). SQL drivers receive an
equivalent DELETE statement via QuerySql instead.
§Examples
ⓘ
use toasty_core::driver::operation::{DeleteByKey, Operation};
let op = DeleteByKey {
table: table_id,
keys: vec![key_value],
filter: None,
};
let operation: Operation = op.into();Fields§
§table: TableIdThe table to delete from.
keys: Vec<Value>Primary key values identifying the records to delete.
filter: Option<Expr>Optional filter expression. When set, only records whose key is in
keys and that match this filter are deleted.
Trait Implementations§
Source§impl Clone for DeleteByKey
impl Clone for DeleteByKey
Source§fn clone(&self) -> DeleteByKey
fn clone(&self) -> DeleteByKey
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 DeleteByKey
impl Debug for DeleteByKey
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.
Auto Trait Implementations§
impl Freeze for DeleteByKey
impl RefUnwindSafe for DeleteByKey
impl Send for DeleteByKey
impl Sync for DeleteByKey
impl Unpin for DeleteByKey
impl UnwindSafe for DeleteByKey
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