Skip to main content

Module fetch

Module fetch 

Source
Expand description

Typed fetch / execution helpers for v2 (feature = "sqlx_*").

These are thin async delegations on top of the sqlx query objects already produced by to_sqlx_query and to_sqlx_query_as in crate::sqlx_bind. They let any QueryBuilder<D> whose D: SqlxDialect run against a sqlx Executor and decode rows into a T: FromRow, or pull a single scalar column.

count mirrors 1.x ChainBuilder::count: it wraps the built SQL in SELECT COUNT(*) FROM (<sql>) AS __cb_count, binds the same arguments, and fetches a single i64.