npm.io
1.3.6 • Published 2 years ago

@types/knex-cleaner

Licence
MIT
Version
1.3.6
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/knex-cleaner

Summary

This package contains type definitions for knex-cleaner (https://github.com/steven-ferguson/knex-cleaner).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knex-cleaner.

index.d.ts

import { Knex } from "knex";

export interface KnexCleanerOptions {
    /**
     * Choose between simply deleting all rows from table or truncating it completely. Default is 'truncate'
     */
    mode?: "truncate" | "delete" | undefined;

    /**
     * Used to tell PostgresSQL to reset the ID counter, default is true
     */
    restartIdentity?: boolean | undefined;

    /**
     * List of tables to ignore. Empty array by default.
     */
    ignoreTables?: string[] | undefined;
}

export function clean(knex: Knex, options?: KnexCleanerOptions): Promise<void>;

Additional Details

Credits

These definitions were written by Karol Goraus.