Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

v2.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Apr 18:16
· 237 commits to main since this release

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

Reverts

  • execute: transaction api (Linden)

Full Changelog: v2.2.5...v2.3.0