refactor: remove typescript and refactor

This commit is contained in:
dunak-debug committed 2021-08-17 02:58:31 +02:00
1 parent d2a9a433bb
commit 8df05c748b
11 files changed
+283 -219

No files matched your search

+19 -2
View File
@@ -1,5 +1,5 @@
---
-- Execute query and fetch all result
-- Execute query and fetch affected rows
--
-- @param query tring
-- @param parameters table
@@ -15,6 +15,23 @@ local function executeSync(query, parameters)
end
exports('executeSync', executeSync)
---
-- Execute query and fetch all result
--
-- @param query tring
-- @param parameters table
--
-- @return table with result
--
local function fetchSync(query, parameters)
local p = promise.new()
exports['oxmysql']:fetch(query, parameters, function(result)
p:resolve(result)
end)
return Citizen.Await(p)
end
exports('fetchSync', fetchSync)
---
-- Execute query and fetch first row
--
@@ -50,7 +67,7 @@ end
exports('scalarSync', scalarSync)
---
-- Insert data and return table with inserted data
-- Insert data and return inserted id
--
-- @param query tring
-- @param parameters table