mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b2b564591 | ||
|
|
3f57c566df | ||
|
|
5e6547611b |
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ game 'gta5'
|
||||
|
||||
name 'oxmysql'
|
||||
description 'Database wrapper for FiveM utilising node-mysql2 offering improved performance and security.'
|
||||
version '1.3.1'
|
||||
version '1.3.2'
|
||||
url 'https://github.com/overextended/oxmysql'
|
||||
author 'overextended'
|
||||
use_fxv2_oal 'yes'
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "oxmysql",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.2",
|
||||
"main": "oxmysql.js",
|
||||
"description": "FiveM MySQL wrapper using faster mysql2",
|
||||
"repository": "[email protected]:overextended/oxmysql.git",
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ const execute = async (query, parameters, resource) => {
|
||||
${error.message}
|
||||
${error.sql || `${query} ${JSON.stringify(parameters)}`}^0`
|
||||
);
|
||||
//console.trace(error);
|
||||
debug && console.trace(error);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
import { pool } from './pool';
|
||||
import { execute } from './execute';
|
||||
|
||||
setImmediate(async () => {
|
||||
try {
|
||||
await (await pool.getConnection()).ping();
|
||||
@@ -11,7 +12,7 @@ setImmediate(async () => {
|
||||
|
||||
const safeCallback = (callback, result, error) => {
|
||||
if (typeof callback === 'function') return callback(result || false);
|
||||
else return console.log(`^1[ERROR] ${error[0]} was unable to execute a query, callback function was undefined!\n ^1 ${error[1]}^0`);
|
||||
else return console.log(`^3[WARNING] ${error[0]} executed a query, but no callback function was defined!\n ^3 ${error[1]}^0`);
|
||||
};
|
||||
|
||||
global.exports('execute', (query, parameters, cb, resource = GetInvokingResource()) => {
|
||||
|
||||
Reference in new issue
Block a user