Closed
Description
minimal steps to reproduce:
struct Rowid {
rowid: i64,
}
#[async_std::main]
async fn main() {
let pool = sqlx::SqlitePool::connect("file::memory:").await.unwrap();
sqlx::query!("CREATE TABLE IF NOT EXISTS test (rowid INTEGER PRIMARY KEY);")
.execute(&pool)
.await
.unwrap();
sqlx::query_as!(
Rowid,
"INSERT INTO test (rowid) VALUES (42) RETURNING rowid"
).fetch_one(&pool).await.unwrap();
}
this with a test database with the first statement executed will yield
error: unsupported type NULL of column #1 ("rowid")
sqlx version: 0.5.5
libsqlite3 version: 3.35.4 (libsqlite3-sys 0.22.2)