pub struct GetByKey {
pub table: TableId,
pub select: Vec<ColumnId>,
pub keys: Vec<Value>,
}Expand description
Fetches one or more records by exact primary key match.
This is the key-value equivalent of SELECT ... WHERE pk IN (...). The
driver returns a row for each key that exists in the table.
§Examples
ⓘ
use toasty_core::driver::operation::{GetByKey, Operation};
let op = GetByKey {
table: table_id,
select: vec![col_id_a, col_id_b],
keys: vec![key1, key2],
};
let operation: Operation = op.into();Fields§
§table: TableIdThe table to fetch from.
select: Vec<ColumnId>Which columns to include in the returned rows.
keys: Vec<Value>Primary key values identifying the records to fetch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GetByKey
impl RefUnwindSafe for GetByKey
impl Send for GetByKey
impl Sync for GetByKey
impl Unpin for GetByKey
impl UnwindSafe for GetByKey
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