|
|
@ -60,7 +60,7 @@ function _M.initDB(self) |
|
|
|
db:exec([[PRAGMA journal_size_limit = 1073741824]]) |
|
|
|
db:exec([[PRAGMA journal_size_limit = 1073741824]]) |
|
|
|
|
|
|
|
|
|
|
|
self.db = db |
|
|
|
self.db = db |
|
|
|
return db |
|
|
|
return self.db |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
function _M.log(self, args, rule_name, reason) |
|
|
|
function _M.log(self, args, rule_name, reason) |
|
|
@ -95,6 +95,7 @@ function _M.log(self, args, rule_name, reason) |
|
|
|
if local_db and local_db:isopen() then |
|
|
|
if local_db and local_db:isopen() then |
|
|
|
local_db:close() |
|
|
|
local_db:close() |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
|
function _M.setDebug(self, mode) |
|
|
|
function _M.setDebug(self, mode) |
|
|
|
debug_mode = mode |
|
|
|
debug_mode = mode |
|
|
@ -103,7 +104,6 @@ end |
|
|
|
|
|
|
|
|
|
|
|
-- 调试方式 |
|
|
|
-- 调试方式 |
|
|
|
function _M.D(self, msg) |
|
|
|
function _M.D(self, msg) |
|
|
|
|
|
|
|
|
|
|
|
if not debug_mode then return true end |
|
|
|
if not debug_mode then return true end |
|
|
|
|
|
|
|
|
|
|
|
local _msg = '' |
|
|
|
local _msg = '' |
|
|
|