Treatment fetchBatch
sql::fetchBatch
Configuration
⬡ sql_pool: sql::SqlPool
Parameters
↳ var base: string
↳ var batch: string
↳ var bind_limit: u64 = 65535
↳ var bind_symbol: string = "?"
↳ var bindings: Vec<string>
↳ var separator: string = ", "
↳ var stop_on_failure: bool = true
Inputs
⇥ bind: Stream<Map> (std/data/map::Map)
Outputs
↦ completed: Block<void>
↦ data: Stream<Map> (std/data/map::Map)
↦ errors: Stream<string>
↦ failed: Block<void>
↦ finished: Block<void>
Execute a batched SQL query and stream each result row as a Map.
Like execute_batch, builds and runs one statement per batch of incoming bind maps,
streaming all result rows through data.
completed or failed is emitted at the end; finished is always emitted.
graph LR
T("fetchBatch()")
B["🟦 🟦 🟦 …"] -->|bind| T
T -->|data| D["🟨 🟨 …"]
T -->|completed| C["〈🟩〉"]
T -->|failed| F["〈🟥〉"]
T -->|errors| E["🟫 …"]
T -->|finished| FN["〈🟦〉"]
style B fill:#ffff,stroke:#ffff
style D fill:#ffff,stroke:#ffff
style C fill:#ffff,stroke:#ffff
style F fill:#ffff,stroke:#ffff
style E fill:#ffff,stroke:#ffff
style FN fill:#ffff,stroke:#ffff