/// import { EventEmitter } from 'events'; import Command from './Command'; import CreateTable from './commands/CreateTable'; import Delete from './commands/Delete'; import Insert, { InsertOne } from './commands/Insert'; import Select, { SelectOne } from './commands/Select'; import Update, { UpdateOne } from './commands/Update'; export { Command }; export interface ConnectionOptions { } export interface LogEvent { level: string; format: string; args: any[]; } /** Connection provides a single interface to functionality of sqlcmd, and stores configuration defaults to be used with every query. The options are unused in sqlcmd -- only sqlcmd-pg, sqlcmd-sqlite3, etc., use the options argument. Events: .on('log', ({level, format, args}) => { ... }) */ export declare abstract class Connection extends EventEmitter { options: ConnectionOptions; constructor(options: ConnectionOptions); /** Execute a sqlcmd Command instance against this connection. Usually called by Command#execute() after the Command instance has been initialized with a sqlcmd.Connection. */ abstract executeCommand(command: Command, callback: (error: Error, result?: R) => void): void; /** Execute a plain SQL query, potentially with prepared parameters, against this sqlcmd.Connection. */ abstract executeSQL(sql: string, args: any[] | { [index: string]: any; }, callback: (error: Error, rows?: any[]) => void): void; CreateTable(table: string): CreateTable; Delete(table: string): Delete; Insert(table: string): Insert; InsertOne(table: string): InsertOne; Select(table: string): Select; SelectOne(table: string): SelectOne; Update(table: string): Update; UpdateOne(table: string): UpdateOne; }