import Knex, { CreateTableBuilder } from 'knex'; declare type creatorFunction = (tb: CreateTableBuilder) => void; export declare class Database { static Connector: Knex; static init(config: Knex.Config): Knex; /** * @method table_create used to create a table in database. Table will be created only if it does not exist. If you want to create the table anyway, use the `forceDrop` flag. * @param tablename table name in database * @param creator this is the table creator function * @param forceDrop Force table drop if it exists then create it. If it is set to false, table won't be created if already exists. */ static table_create(tablename: string, creator: creatorFunction, forceDrop?: boolean): Promise; /** * @method insert data into database table * @param tablename tablename for insertion * @param binds obje {column_name: value} * @param checkUniqueness whether to check if row exists. "Duplicate key" error can be suppressed with it, because we try to insert only if it does not exists. * @returns Promise is rejected on error. Promise resolves to true only if insertion was successful. Resolves to false only if param(checkUniqueness) was requested and insertion would be resulted in error. */ static insert(tablename: string, binds: {}, checkUniqueness?: boolean): Promise; } export {}; //# sourceMappingURL=Database.d.ts.map