import Knex from 'knex'; import { IncomingWalletConfig } from '../config'; /** * A collection of static utility methods for db admin */ export declare class DBAdmin { /** * Creates a database based on the database specified in the wallet configuration * @param config The wallet configuration object with a database specified */ static createDatabase(config: IncomingWalletConfig): Promise; /** * Creates the database specified by the knex instance connection info * @param knex The knex instance which should have a db name specified */ static createDatabaseFromKnex(knex: Knex): Promise; /** * Drops the database based on the database specified in the wallet configuration * @param config The wallet configuration object containing the database configuration to use */ static dropDatabase(config: IncomingWalletConfig): Promise; /** * Drops the database specified by the knex instance connection info * @param knex The knex instance which should have a db name specified */ static dropDatabaseFromKnex(knex: Knex): Promise; /** * Performs wallet database migrations against the database specified in the config * @param config The wallet configuration object containing the database configuration to use */ static migrateDatabase(config: IncomingWalletConfig): Promise; /** * Performs wallet database migrations for the database specified by the knex instance connection info * @param knex The knex instance that will be used for the migrations */ static migrateDatabaseFromKnex(knex: Knex): Promise; /** * Truncates data from all the specified tables * @param config The wallet configuration object containing the database configuration to use * @param tables A list of table names to truncate. Defaults to ALL tables */ static truncateDatabase(config: IncomingWalletConfig, tables?: string[]): Promise; /** * Truncates data from all the specified tables * @param knex A knex instance connected to a wallet database * @param tables A list of table names to truncate, which defaults to ALL tables */ static truncateDataBaseFromKnex(knex: Knex, tables?: string[]): Promise; } export declare function getKnexFromConfig(config: IncomingWalletConfig): Knex; //# sourceMappingURL=db-admin.d.ts.map