Files
oxmysql/lib
Linden e8f1abcab7 feat(rawExecute): "prepare" alternative without unpacking
See #179. Always return an array of row results (or null).
Parameters are now optional (though preferred).
2023-06-06 14:37:05 +10:00
..
2023-03-07 02:13:49 +11:00
2023-01-28 16:30:35 +11:00

OxMySQL exports wrapper for FiveM

Types are fully supported and you will get intellisense on the oxmysql object when using it.

Installation

# With pnpm
pnpm add @overextended/oxmysql

# With Yarn
yarn add @overextended/oxmysql

# With npm
npm install @overextended/oxmysql

Usage

Import as module:

import { oxmysql } from '@overextended/oxmysql';

Import with require:

const { oxmysql } = require('@overextended/oxmysql');

Documentation

View documentation

oxmysql.scalar('SELECT username FROM users', (result) => {
    console.log(result)
}).catch(console.error)

oxmysql.scalar('SELECT username FROM users').then((result) => {
    console.log(result)
}).catch(console.error)

const result = await oxmysql.scalar('SELECT username FROM users').catch(console.error)
console.log(result)

License

LGPL-3.0