Check SQL query passed to execute

When `extra_check` feature is activated:
Fail when query has a column count > 0
Or when query is readonly.
This commit is contained in:
gwenn
2019-08-26 20:21:23 +02:00
parent 835b69fcb7
commit 00d50199a2
5 changed files with 34 additions and 5 deletions

View File

@@ -890,7 +890,8 @@ mod test {
)
.expect("create temp db");
let mut db1 = Connection::open_with_flags(&path, OpenFlags::SQLITE_OPEN_READ_WRITE).unwrap();
let mut db1 =
Connection::open_with_flags(&path, OpenFlags::SQLITE_OPEN_READ_WRITE).unwrap();
let mut db2 = Connection::open_with_flags(&path, OpenFlags::SQLITE_OPEN_READ_ONLY).unwrap();
db1.busy_timeout(Duration::from_millis(0)).unwrap();