Skip to main content

with_pool

Macro with_pool 

Source
macro_rules! with_pool {
    ($pool:expr, |$p:ident| $body:expr) => { ... };
}
Expand description

Expands $body once per backend, so each copy type-checks against a concrete sqlx database.

The closure syntax only keeps rustfmt formatting the body. It is not a closure, so ? and return leave the enclosing function. sqlx’s Any driver would avoid the expansion but cannot bind JSON.