toasty_core/driver/operation/
delete_by_key.rs

1use super::Operation;
2use crate::{schema::db::TableId, stmt};
3
4#[derive(Debug, Clone)]
5pub struct DeleteByKey {
6    /// Which table to delete from
7    pub table: TableId,
8
9    /// Which keys to delete
10    pub keys: Vec<stmt::Value>,
11
12    /// Only delete keys that match the filter
13    pub filter: Option<stmt::Expr>,
14}
15
16impl From<DeleteByKey> for Operation {
17    fn from(value: DeleteByKey) -> Self {
18        Self::DeleteByKey(value)
19    }
20}