Rust: Test more variants of rusqlite usage.

This commit is contained in:
Geoffrey White
2025-08-11 16:36:59 +01:00
parent 31353e7efc
commit b31186451f

View File

@@ -48,5 +48,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
})
})?;
_ = connection.prepare_cached("SELECT id, name, age FROM person")?; // $ MISSING: sql-sink
_ = connection.prepare_with_flags("SELECT id, name, age FROM person", rusqlite::PrepFlags::empty())?; // $ MISSING: ql-sink
_ = connection.query_row_and_then("SELECT id, name, age FROM person", [], |row| { // $ sql-sink
let row: &rusqlite::Row<'_> = row;
let result: Result<i32, rusqlite::Error> = Ok(row.get(0)?); // $ database-read
result
})?;
Ok(())
}