Treatment fetch
sql::fetch
Configuration
⬡ sql_pool: sql::SqlPool
Parameters
↳ var bind_symbol: string = "?"
↳ var bindings: Vec<string>
↳ var sql: string
Inputs
⇥ bind: Block<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 parameterised SQL query and stream each result row as a Map.
bind supplies the parameter values. Rows are streamed through data as they arrive.
completed and finished are emitted once all rows have been sent; failed, errors,
and finished are emitted on error.
graph LR
T("fetch()")
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