5.0.1 • Published 3 months ago

@types/mysql-import v5.0.1

Weekly downloads
162
License
MIT
Repository
github
Last release
3 months ago

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

// Type definitions for mysql-import 2.0
// Project: https://github.com/pamblam/mysql-import#readme
// Definitions by: Ben Grynhaus <https://github.com/bengry>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export interface Settings {
    /**
     * The MySQL host to connect to.
     */
    host: string;
    /**
     * The MySQL port to connect to.
     */
    port?: number | undefined;
    /**
     * The MySQL user to connect with.
     */
    user: string;
    /**
     * The password for the user.
     */
    password: string;
    /**
     * The database to connect to.
     */
    database: string;
    /**
     * Function to handle errors. The function will receive the Error. If not provided the error will be thrown.
     */
    onerror?(error: any): void;
}

export interface Importer {
    /**
     * Import an .sql file to the database.
     */
    import(filename: string): Promise<void>;
}

export function config(settings: Settings): Importer;

Additional Details

  • Last updated: Thu, 08 Jul 2021 18:51:07 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Ben Grynhaus.

5.0.1

3 months ago

5.0.0

3 months ago

2.0.3

6 months ago

2.0.2

7 months ago

2.0.1

3 years ago

2.0.0

5 years ago