mod_storage_sql: Use config enum for 'sqlite_tune'
authorKim Alvefur <zash@zash.se>
Tue, 18 Jul 2023 11:53:12 +0200
changeset 13226 cb6a17eaa0e6
parent 13225 2a9ce229efac
child 13227 b88b3e414550
mod_storage_sql: Use config enum for 'sqlite_tune'
plugins/mod_storage_sql.lua
--- a/plugins/mod_storage_sql.lua	Mon Jul 17 04:52:50 2023 +0200
+++ b/plugins/mod_storage_sql.lua	Tue Jul 18 11:53:12 2023 +0200
@@ -935,7 +935,7 @@
 				-- Note: These things can't be changed with in a transaction. LuaDBI
 				-- opens a transaction automatically for every statement(?), so this
 				-- will not work there.
-				local tune = module:get_option_string("sqlite_tune", "default");
+				local tune = module:get_option_enum("sqlite_tune", "default", "normal", "fast", "safe");
 				if tune == "normal" then
 					if journal_mode ~= "wal" then
 						engine:execute("PRAGMA journal_mode=WAL;");