UNPKG

@itrocks/mysql-maintainer

Version:

Reactively maintains database structure by updating schema and retrying on MySQL errors

17 lines (16 loc) 718 B
import { Type } from '@itrocks/class-type'; import { Connection } from 'mariadb'; import { QueryOptions } from 'mariadb'; import { SqlError } from 'mariadb'; import { Context } from './contextual-connection'; export * from './mysql'; export declare class MysqlMaintainer { connection: Connection; constructor(connection: Connection); createContextTables(context: Context): boolean; createImplicitTables(sql: string | QueryOptions): boolean; createTable(type: Type): boolean; manageError(error: SqlError, context: Context, sql: string | QueryOptions, values: any[]): Promise<boolean>; updateContextTables(context: Context): Promise<boolean>; updateTable(type: Type): Promise<boolean>; }