@types/mysql-query-util
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

Installation

npm install --save @types/mysql-query-util

Summary

This package contains type definitions for mysql-query-util (https://github.com/uchennaemeruche/mysql-util#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mysql-query-util.

index.d.ts

/// <reference types="node" />

declare function _delete(options: IterableOptions): Promise<any>;
declare function _delete(tableName: string, params?: Array<Array<string | number>>): Promise<any>;

export function setConnection(options: connectionString): any;

export function select(options: IterableOptions): Promise<any>;
export function select(tableName: string, fields?: string[], params?: Array<Array<string | number>>): Promise<any>;

export function insert(options: IterableOptions): Promise<any>;
export function insert(tableName: string, data: object): Promise<any>;

export function update(option: IterableOptions): Promise<any>;
export function update(tableName: string, data: object, params: Array<Array<string | number>>): Promise<any>;

export { _delete as delete };

export function query(queryType: string, tableName: string, fields?: any, data?: any, params?: any): Promise<any>;

export interface IterableOptions {
    tableName: string;
    fields?: string[] | undefined;
    params?: Array<Array<string | number>> | undefined;
    data?: object | undefined;
}

export interface connectionString {
    /**
     * The hostname of the database you are connecting to. (Default: localhost)
     */
    host: string;
    /**
     * The MySQL user to authenticate as
     */
    user: string;
    /**
     * The password of that MySQL user
     */
    password: string;
    /**
     * Name of the database to use for this connection
     */
    database: string;
    /**
     * The maximum number of connections to create at once. (Default: 10)
     */
    connectionLimit?: number | undefined;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Uchenna Emeruche.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.30ts5.8
0.2.30ts5.7
0.2.30latest
0.2.30ts4.5
0.2.30ts4.6
0.2.30ts4.7
0.2.30ts4.8
0.2.30ts4.9
0.2.30ts5.0
0.2.30ts5.1
0.2.30ts5.2
0.2.30ts5.3
0.2.30ts5.4
0.2.30ts5.5
0.2.30ts5.6
0.2.30ts5.9
0.2.10ts3.6
0.2.10ts3.7
0.2.10ts3.8
0.2.10ts3.9
0.2.10ts4.0
0.2.10ts4.1
0.2.10ts4.2
0.2.10ts4.3
0.2.10ts4.4
0.2.00ts3.4
0.2.00ts3.5

Version History

VersionDownloads (Last 7 Days)Published
0.2.30
0.2.20
0.2.10
0.2.00

Package Sidebar

Install

npm i @types/mysql-query-util

Weekly Downloads

0

Version

0.2.3

License

MIT

Unpacked Size

5.94 kB

Total Files

5

Last publish

Collaborators

  • types