index.d.ts 1.1 KB

123456789101112131415
  1. /**
  2. * Adapted from https://github.com/mysqljs/sqlstring/blob/cd528556b4b6bcf300c3db515026935dedf7cfa1/lib/SqlString.js
  3. * MIT LICENSE: https://github.com/mysqljs/sqlstring/blob/cd528556b4b6bcf300c3db515026935dedf7cfa1/LICENSE
  4. */
  5. import type { Raw, SqlValue, Timezone } from './types.js';
  6. import { Buffer } from 'node:buffer';
  7. export type { Raw, SqlValue, Timezone } from './types.js';
  8. export declare const dateToString: (date: Date, timezone: Timezone) => string;
  9. export declare const escapeId: (value: SqlValue, forbidQualified?: boolean) => string;
  10. export declare const objectToValues: (object: Record<string, SqlValue>, timezone?: Timezone) => string;
  11. export declare const bufferToString: (buffer: Buffer) => string;
  12. export declare const arrayToList: (array: SqlValue[], timezone?: Timezone) => string;
  13. export declare const escape: (value: SqlValue, stringifyObjects?: boolean, timezone?: Timezone) => string;
  14. export declare const format: (sql: string, values?: SqlValue | SqlValue[], stringifyObjects?: boolean, timezone?: Timezone) => string;
  15. export declare const raw: (sql: string) => Raw;