Test that extra_check feature works with RETURNING statements (#932)

Test that extra_check feature works with RETURNING statements
This commit is contained in:
gwenn 2021-04-04 12:47:21 +02:00 committed by GitHub
parent 517ef2beae
commit 6c956bb270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(())
}
}