pub struct BatchDeleteSpec {
pub table: &'static str,
pub scope_col: &'static str,
pub scope_val: SqlValue,
pub key_col: &'static str,
pub key_vals: Vec<SqlValue>,
}Expand description
BatchDelete 规格:DELETE FROM table WHERE scope_col = ? AND key_col IN (key_vals)。
复合 PK 作用域删除(如 channel_member:scope=channel_id 等值 + key=user_id IN 列表)——
表名 / 列名编译期常量(core 不解释含义,守 HX-C001),单语句 O(k) 删 k 行。scope 等值约束
绝不跨作用域误删(无 scope 会把该 user 从所有 channel 删掉)。key_vals 空 → 上层应不产 op。
Fields§
§table: &'static str目标表名(编译期常量)
scope_col: &'static str作用域列名(等值约束,编译期常量)—— 复合 PK 第一段,如 channel_id。
scope_val: SqlValue作用域运行时值(定位作用域;core 不解析含义)
key_col: &'static strIN-list 列名(编译期常量)—— 复合 PK 第二段,如 user_id。
key_vals: Vec<SqlValue>待删行的 key 运行时值列表
Trait Implementations§
Source§impl Clone for BatchDeleteSpec
impl Clone for BatchDeleteSpec
Source§fn clone(&self) -> BatchDeleteSpec
fn clone(&self) -> BatchDeleteSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BatchDeleteSpec
impl RefUnwindSafe for BatchDeleteSpec
impl Send for BatchDeleteSpec
impl Sync for BatchDeleteSpec
impl Unpin for BatchDeleteSpec
impl UnsafeUnpin for BatchDeleteSpec
impl UnwindSafe for BatchDeleteSpec
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