Types are fully supported and you will get intellisense on the oxmysql
object when using it.
# With pnpm
pnpm add @overextended/oxmysql
# With Yarn
yarn add @overextended/oxmysql
# With npm
npm install @overextended/oxmysql
Import as module:
import { oxmysql } from '@overextended/oxmysql';
Import with require:
const { oxmysql } = require('@overextended/oxmysql');
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)
LGPL-3.0