mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 04:01:32 +00:00
17 lines
455 B
Lua
17 lines
455 B
Lua
function Bridge.Database.Query(query, parameters)
|
|
return MySQL.query.await(query, parameters or {})
|
|
end
|
|
|
|
function Bridge.Database.Transaction(statements)
|
|
local queries = {}
|
|
for index = 1, #statements do
|
|
local statement = statements[index]
|
|
queries[index] = {
|
|
query = statement.query,
|
|
values = statement.params or statement.values or {},
|
|
}
|
|
end
|
|
|
|
return MySQL.transaction.await(queries)
|
|
end
|