toasty_core/driver/operation/get_by_key.rs
1use super::Operation;
2
3use crate::{
4 schema::db::{ColumnId, TableId},
5 stmt,
6};
7
8#[derive(Debug, Clone)]
9pub struct GetByKey {
10 /// Which table to get from
11 pub table: TableId,
12
13 /// Which columns to select
14 pub select: Vec<ColumnId>,
15
16 /// Which keys to fetch
17 pub keys: Vec<stmt::Value>,
18}
19
20impl From<GetByKey> for Operation {
21 fn from(value: GetByKey) -> Self {
22 Self::GetByKey(value)
23 }
24}