Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Script OxMySQL - Lightweight MySQL wrapper

Ares

VAG
Admin
Joined
May 6, 2021
Messages
547
Reaction score
97,400
Points
411
Location
root
Website
vag.gg
Hello Vag forum members, I wanted to share a new system that I came across, I hope you like it.

Introduction​

Lightweight database middleware for FXServer which utilises to communicate with a database and respond with the query results.


Motivation​

You may know that the existing wrappers ( / ) utilises unmaintained which has issue with MySQL 8`s authentication as it was never merged in this . and they are experiencing performance loss due to scheduling result on next tick which is about 50ms.

Discussion about fix of this performance loss can be found .


Features​

  • Improved performance and compatibility
  • Resolves issues when using MySQL 8.0
  • Returns callbacks immediately, removing up to 50ms overhead
  • Lua sync wrappers utilise promises to remove additional overhead

Installation​

  • Download oxmysql.zip from
  • Put oxmysql in the resources folder
  • Configure in server.cfg
  • Put ensure oxmysql before your resources

Configuration​

set mysql_connection_string "mysql://user: password@host/database?charset=utf8mb4"
set mysql_slow_query_warning 100


Documentation & Usage​

oxmysql is a database wrapper for FiveM.



Calling the JS exports will result in async behaviour, or you can use the Lua exports to return a promise and await the response.

database wrapper for FiveM. Contribute to overextended/oxmysql development by creating an account on GitHub.

Overextended organisation​

Overextended has 3 repositories available. Follow their code on GitHub.
 
Top