Open
Description
Bug Description
When including hardcoded values in a SELECT
statement, the value that is returned by sqlx is an Option<T>
type.
For example;
let record = query!("SELECT true as value").fetch_one(conn).await?;
println!("{:?}", record.value);
results in;
Some(true)
While I would expect that this should not have to be an option, since it is guaranteed that the value is always present.
Minimal Reproduction
Info
- SQLx version: 0.7.3
- SQLx features enabled: postgres, runtime-tokio
- Database server and version: (Running in docker:) PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
- Operating system: Pop!_OS 22.04 LTS x86_64
rustc --version
: 1.80.1