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

5.0.1 • Public • Published

Installation

npm install --save @types/mysql-import

Summary

This package contains type definitions for mysql-import (https://github.com/pamblam/mysql-import#readme).

Details

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

index.d.ts

import { ConnectionOptions } from "mysql2";

export default class Importer {
    constructor(settings: ConnectionOptions);

    getImported(): Array<{ file: string; size: number }>;
    setEncoding(encoding: "utf8" | "ucs2" | "utf16le" | "latin1" | "ascii" | "base64" | "hex"): void;
    use(database: string): Promise<void>;
    onProgress(
        cb: (object: {
            total_files: number;
            file_no: number;
            bytes_processed: number;
            total_bytes: number;
            file_path: string;
        }) => void,
    ): void;
    onDumpComplete(
        cb: (object: {
            total_files: number;
            file_no: number;
            file_path: string;
            error: Error | null;
        }) => void,
    ): void;
    import(...input: ReadonlyArray<string | readonly string[]>): Promise<void>;
    disconnect(graceful?: boolean): Promise<void>;
}

Additional Details

  • Last updated: Mon, 29 Jan 2024 22:06:49 GMT
  • Dependencies: mysql2

Credits

These definitions were written by Ben Grynhaus, and Chiaki Abe.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/mysql-import

Weekly Downloads

658

Version

5.0.1

License

MIT

Unpacked Size

4.64 kB

Total Files

5

Last publish

Collaborators

  • types