@itrocks/mysql-maintainer
Version:
Reactively maintains database structure by updating schema and retrying on MySQL errors
12 lines (11 loc) • 569 B
TypeScript
import { ObjectOrType } from '@itrocks/class-type';
import { Connection } from 'mariadb';
import { QueryOptions } from 'mariadb';
export type Context = ObjectOrType | ObjectOrType[];
export declare class Contextual implements Partial<Connection> {
context: Context[];
superQuery: <T = any>(sql: string | QueryOptions, values?: any) => Promise<T>;
applyTo(connection: ContextualConnection): Promise<ContextualConnection>;
query<T = any>(sql: string | QueryOptions, values?: any): Promise<T>;
}
export type ContextualConnection = Connection & Contextual;