Test that extra_check feature works with RETURNING statements
Test that extra_check feature works with RETURNING statements
@@ -1921,4 +1921,17 @@ mod test {
}
Ok(())
}
+
+ #[test]
+ #[cfg(feature = "bundled")] // SQLite >= 3.35.0
+ fn test_returning() -> Result<()> {
+ let db = checked_memory_handle();
+ db.execute_batch("CREATE TABLE foo(x INTEGER PRIMARY KEY)")?;
+ let row_id =
+ db.query_row::<i64, _, _>("INSERT INTO foo DEFAULT VALUES RETURNING ROWID", [], |r| {
+ r.get(0)
+ })?;
+ assert_eq!(row_id, 1);
+ Ok(())
+ }
}
