diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/sqlite3.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/sqlite3.lua b/util/sqlite3.lua index 332f0068..4caf121a 100644 --- a/util/sqlite3.lua +++ b/util/sqlite3.lua @@ -164,6 +164,16 @@ function engine:execute(sql, ...) if not success then return success, err; end local prepared = self.prepared; + if select('#', ...) == 0 then + local ret = self.conn:exec(sql); + if ret ~= lsqlite3.OK then + local err = sqlite_errors.new(err); + err.text = self.conn:errmsg(); + return err; + end + return true; + end + local stmt = prepared[sql]; if not stmt then local err; |