This repository was archived by the owner on Apr 29, 2025. It is now read-only.
v2.3.0
Introduces a third syntax for transactions, alongside the mysql-async compatible syntax.
This isn't necessarily better or preferred, rather just another way to perform transactions.
MySQL.prepare has also been reverted and no longer performs UPDATE and INSERT queries as transactions, due to some compatibility issues.
New
local success = MySQL.transaction.await({
{ 'INSERT INTO test VALUES (?, ?)', {'Linden', 'Linden'} },
{ 'UPDATE test SET a = ? WHERE b = ?', {'Peter', 'Linden'}},
})
Original
local success = MySQL.transaction.await({
{ query = 'INSERT INTO `test` (id) VALUES (?)', values = { 1 } },
{ query = 'INSERT INTO `test` (id) VALUES (?)', values = { 2 } }
})
local success = MySQL.transaction.await({
'INSERT INTO `test` (id, name) VALUES (:someid, :somename)',
'SET `name` = :newname IN `test` WHERE `id` = :someid'
}, {
['someid'] = 2, ['somename'] = 'John Doe', ['newname'] = 'John Notdoe'
})
Features
- ci: Automatic fxmanifest bumping (Luke)
Code Refactoring
- lib/lua: safeArgs error messages (Linden)
- transaction: support new transaction syntax (Linden)
- database: new URI parser (Linden)
Chores
- version bump (Linden)
Reverts
- execute: transaction api (Linden)
Full Changelog: v2.2.5...v2.3.0