import * as Mysql from "mysql";
import { EventEmitter } from "events";


export default class MysqlMock implements Mysql.Connection {

    config: Mysql.ConnectionConfig;
    
    state: 'connected' | 'authenticated' | 'disconnected' | 'protocol_error' | string;
    
    threadId: number | null;
    
    createQuery: Mysql.QueryFunction;

    connect(callback?: (err: Mysql.MysqlError, ...args: any[]) => void): void {}

    changeUser(options: any, callback?: any): void {}    
    
    beginTransaction(options?: any, callback?: any): void {}

    commit(options?: any, callback?: any): void {}

    rollback(options?: any, callback?: any): void {}

    query: Mysql.QueryFunction;

    ping(options?: any, callback?: any): void {}

    statistics(options?: any, callback?: any): void {}

    end(callback: any): void {}

    destroy(): void {}

    pause(): void {}

    resume(): void {}

    on(ev: any, callback: any): any {}   
    
    escape(value: any, stringifyObjects?: boolean, timeZone?: string): string {return ""}
    
    escapeId(value: string, forbidQualified?: boolean): string {return ""}
    
    format(sql: string, values: any[], stringifyObjects?: boolean, timeZone?: string): string {return ""}
    
}
    