mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 16:23:22 +00:00
ENH - add standalone framework and inventory bridges
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in New Issue
Block a user