refactor(sql): disable double-quoted string literals

Double-quoted string literals are not standard
and may be accidentally treated as an identifier
if there is an identifier with the same name
as the string contents:
https://sqlite.org/quirks.html#double_quoted_string_literals_are_accepted
This commit is contained in:
link2xt
2026-09-17 13:31:41 +00:00
committed by l
parent 3858c47ceb
commit dc9bba0697
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -741,6 +741,11 @@ fn new_connection(path: &Path, passphrase: &str) -> Result<Connection> {
// Default synchronous=FULL is much slower. NORMAL is sufficient for WAL mode.
conn.pragma_update(None, "synchronous", "NORMAL".to_string())?;
// Disable double-quoted string literals misfeature.
// <https://sqlite.org/quirks.html#double_quoted_string_literals_are_accepted>
conn.set_db_config(DbConfig::SQLITE_DBCONFIG_DQS_DML, false)?;
conn.set_db_config(DbConfig::SQLITE_DBCONFIG_DQS_DDL, false)?;
Ok(conn)
}