diff options
-rw-r--r-- | db.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -80,8 +80,8 @@ export.runsqlcommand = function(dbobject, sql, transaction) end if table and dbobject.table_creation_scripts and dbobject.table_creation_scripts[table] then if transaction then assert(dbobject.con:execute("ROLLBACK TO before_command")) end - dbobject.runscript(dbobject.table_creation_scripts[table]) - dbobject.runsqlcommand(sql) + dbobject.runscript(dbobject.table_creation_scripts[table], transaction) + dbobject.runsqlcommand(sql, transaction) else assert(res, err) end @@ -127,9 +127,9 @@ export.getselectresponse = function(dbobject, sql, transaction) table = string.match(err, "LuaSQL: no such table: (%S+)") end if table and dbobject.table_creation_scripts and dbobject.table_creation_scripts[table] then - if transaction then assert(con:execute("ROLLBACK TO before_select")) end - dbobject.runscript(dbobject.table_creation_scripts[table]) - return dbobject.getselectresponse(sql) + if transaction then assert(dbobject.con:execute("ROLLBACK TO before_select")) end + dbobject.runscript(dbobject.table_creation_scripts[table], transaction) + return dbobject.getselectresponse(sql, transaction) else assert(res, err) end |