mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
refactor: error handling
Meant to push this before release. Ensures errors are handled as before, regardless of using exports or lib/mysql; for compatibility.
This commit is contained in:
1 parent
a709f67e99
commit
15884fbc82
4 files changed
+7
-7
No files matched your search
+2
-2
@@ -74,7 +74,7 @@ local function await(fn, query, parameters)
|
||||
end
|
||||
|
||||
p:resolve(result)
|
||||
end, GetCurrentResourceName, false)
|
||||
end, GetCurrentResourceName, true)
|
||||
return Await(p)
|
||||
end
|
||||
|
||||
@@ -86,7 +86,7 @@ setmetatable(MySQL, {
|
||||
|
||||
__call = function(_, query, parameters, cb)
|
||||
query, parameters, cb = safeArgs(query, parameters, cb, method == 'transaction')
|
||||
return oxmysql[method](nil, query, parameters, cb, GetCurrentResourceName, true)
|
||||
return oxmysql[method](nil, query, parameters, cb, GetCurrentResourceName, false)
|
||||
end,
|
||||
|
||||
__index = function(_, index)
|
||||
|
||||
Reference in new issue
Block a user