npm.io
5.0.1 • Published 2 years ago

@types/mysql-import

Licence
MIT
Version
5.0.1
Deps
1
Size
5 kB
Vulns
7
Weekly
0
Stars
51.4K

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 2249 GMT
  • Dependencies: mysql2

Credits

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