qql_core/ast/statement/batch.rs
1//! `BATCH { … }` statement: one Qdrant batch RPC for homogeneous members.
2
3use alloc::vec::Vec;
4
5use super::{SearchParams, Stmt};
6
7/// `BATCH { <stmt>; … }` — members execute as one batch RPC.
8///
9/// Members are full statements sharing one collection and one family (all
10/// queries or all mutations). Homogeneity is validated by the lowerer; the
11/// parser only rejects empty blocks, nested batches, and non-batchable
12/// statement kinds (DDL, `SHOW`, `COUNT`, `SCROLL`, `FACET`, `SET QUOTA`).
13#[derive(Debug, Clone, PartialEq)]
14#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
15pub struct BatchStmt {
16 /// Member statements in execution order.
17 pub statements: Vec<Stmt>,
18 /// Durability flag for mutation batches (`WAIT`, `?wait=`).
19 pub wait: Option<bool>,
20 /// Shared read opts for query batches (`PARAMS`, `?timeout=`/`?consistency=`).
21 pub params: Option<SearchParams>,
22}