Skip to content

Releases: brouznouf/fivem-mysql-async

3.3.2

19 Jul 17:30
Compare
Choose a tag to compare

Changes

  • Removes whitespaces from a legacy connection string.
  • Migrated client-side from JS -> LUA for reduced overhead.
  • Added a new Server Status display in the UI that gives you hints on optimizing your mysql server (issues should be detected properly, advice might not to be reworked in wording and expanded upon in scope).

Possibilities for future versions I am considering

  • Analyze a slow query / table which optimizations would be useful.
  • Return values for transactions including if the transaction succeeded or not (still not sure how to implement it).
  • Expand the scope of the analysis of the server status.

If you got more ideas, please let me know on discord, cfx:re forums or in the issues for suggestions.

3.3.1

05 Jul 20:34
Compare
Choose a tag to compare
  • Added mysql_log_level that lets you control on what is output in console.
  • Added mysql_log_file_format to specify the output log file.
  • Reworked the UI. UI Bundle-size lost ~550kB in size.

3.3.0

17 Jun 14:40
Compare
Choose a tag to compare
  • Uses ghmattimysql now completely, shares almost the complete list of features.
  • Enabled js-syntax, which allows nifty shortcuts:
MySQL.Async.fetchAll('SELECT * FROM ?? WHERE ?', {'users', {['id'] = id}})
-- Renders as: SELECT * FROM `users` WHERE `id` = @id; with parameter id being id
  • The js-syntax also allows for bulk inserts.
  • Switched to typescript.
  • Blob field issue has been fixed and now returns arrays.
  • Store feature has been added, it is useful for replacing reptitive queries, as the entire query string does not need to be resend to mysql-async
local queryId = MySQL.Sync.store('SELECT * FROM ?? WHERE ?')
--...
MySQL.Async.fetchAll(queryId, {'users', {['id'] = id}}, function(result)
  print(json.encode(result))
end)

3.2.3

23 May 10:29
Compare
Choose a tag to compare

Changes

  • Fix #129
  • Fix transactions responding with true despite failing.
  • Implemented the command mysql:debug to toggle the debug printing #117. If it only redirects to file, it will only print to file.

3.2.2

18 May 12:42
ec2bd6b
Compare
Choose a tag to compare

Changes

  • Fixed a possible timeout when resources were loading to slow.
  • Added a warning against using MySQL 8, since the performance can be abysmal.

Inserting 1M rows:

### MySQL 5.7 ###
Average: 15.81ms +- 5.81ms
[Min, Max]: [2ms, 119]ms  

### Mysql 8.0 ###
Average: 27.14ms +- 66.58ms
[Min, Max]: [3ms, 1323]ms

### MariaDB 10.4 ###
Average: 13.93ms +- 5.20ms
[Min, Max]: [3ms, 151]ms

### MariaDB 10.3 ###
Average: 16.38ms +- 7.85ms
[Min, Max]: [2ms, 200]ms

3.2.1

07 May 18:57
Compare
Choose a tag to compare

Changes

  • Switch to mysql 2.18.1
  • Fixed slow query warnings showing up properly, thanks to @Frosty-Ice
  • Added Date + Time for File Logging, from @Neddings
  • Updated all packages, frontend switched to Vuetify v2 (what a huge overhead).
  • Moved to fxmanifest from __resource.lua, should work with redm.
  • Fixed Sync transactions not working properly, thanks to @niekschoemaker

3.2.0

07 Jul 09:44
Compare
Choose a tag to compare

Changes

  • Go back to mysql.js 2.15
  • Add transactions
  • Errors are now always red, unless the debug output is only written to files.
  • Use stylus for styling

Transaction examples:

local sqls = { 'UPDATE test_users SET last_name = @ln1 WHERE id = @id1', 'UPDATE test_users SET last_name = @ln2 WHERE id = @id2' }
  local params = { id1 = 21, id2 = 22, ['@ln1'] = 'MySQL-Async1', ['@ln2'] = 'MySQL-Async2' }
  MySQL.Async.transaction(sqls, params, function(result)
    if result then
      print('Success1')
    else
      print('Failure1')
    end
  end)
  local sqls = { 
    { query = 'UPDATE test_users SET last_name = @ln1 WHERE id = @id1', parameters = { id1 = 23, ['@ln1'] = 'MySQL-Async3' } },
    { query = 'UPDATE test_users SET last_name = @ln2 WHERE id = @id2', parameters = { id2 = 24, ['@ln2'] = 'MySQL-Async4' } }
  }
  MySQL.Async.transaction(sqls, function(result)
    if result then
      print('Success2')
    else
      print('Failure2')
    end
  end)
  local sqls = { 
    { query = 'UPDATE test_users SET last_name = @ln1 WHERE id = @id1', parameters = { id1 = 25, ['@ln1'] = 'MySQL-Async3' } },
    { query = 'UPDATE test_users SET last_name = @ln2 WHERE idd = @id2', parameters = { id2 = 26, ['@ln2'] = 'MySQL-Async4' } }
  }
  MySQL.Async.transaction(sqls, function(result)
    if result then
      print('Success3')
    else
      print('Failure3')
    end
  end)

This will print:

Success1
Success2
Failure3

3.1.1

31 May 12:56
Compare
Choose a tag to compare

Changes:

  • Removed excessive error reporting.
  • Removed MySQL.Ready's reliance on events

3.1.0

17 May 13:12
Compare
Choose a tag to compare
Update to 3.1

3.0.11

10 May 11:50
Compare
Choose a tag to compare
  • Fixed some scope issues. Might fix the configuration issue.
  • Fixed the debug print.