mirror of
https://github.com/hanzoai/better-sqlite3-multiple-ciphers.git
synced 2026-09-24 16:57:19 +00:00
991 B
991 B
Unsafe mode
By default, better-sqlite3-multiple-ciphers prevents you from doing things that might corrupt your database or cause undefined behavior. Such unsafe operations include:
- Anything blocked by
SQLITE_DBCONFIG_DEFENSIVE - Mutating the database while iterating through a query's result set
However, some advanced users might want to use these functionalities at their own risk. For this reason, users have the option of enabling "unsafe mode".
db.unsafeMode(); // Unsafe mode ON
db.unsafeMode(true); // Unsafe mode ON
db.unsafeMode(false); // Unsafe mode OFF
Unsafe mode can be toggled at any time, and independently for each database connection. While toggled on, better-sqlite3-multiple-ciphers will not prevent you from performing the dangerous operations listed above.