Open rikvdkleij opened 7 months ago
This PR adds support for querying scalars with the following functions:
query_scalar
query_one_scalar
query_opt_scalar
It removes the need to always handle a row.
Also in the process of migrating from sqlx to tokio-postgres it's convenient to have support for scalar query functions.
sqlx
tokio-postgres
Questions and/or suggestions are welcome!
This PR adds support for querying scalars with the following functions:
query_scalar
returns a vector of scalarsquery_one_scalar
returns one scalarquery_opt_scalar
returns optional scalarIt removes the need to always handle a row.
Also in the process of migrating from
sqlx
totokio-postgres
it's convenient to have support for scalar query functions.Questions and/or suggestions are welcome!