mirror of
https://github.com/chatmail/core.git
synced 2026-10-27 15:18:43 +03:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user