query - basic print workflow - messages on client

This commit is contained in:
Jan Prochazka
2020-04-05 20:48:04 +02:00
parent 3df4e9b7dc
commit 72375ec635
13 changed files with 315 additions and 24 deletions

View File

@@ -1,12 +1,21 @@
import { QueryResult } from "./query";
import { SqlDialect } from "./dialect";
import { SqlDumper } from "./dumper";
import { DatabaseInfo } from "./dbinfo";
import { QueryResult } from './query';
import { SqlDialect } from './dialect';
import { SqlDumper } from './dumper';
import { DatabaseInfo } from './dbinfo';
export interface StreamOptions {
recordset: (columns) => void;
row: (row) => void;
error: (error) => void;
done: (result) => void;
info: (info) => void;
}
export interface EngineDriver {
engine: string;
connect(nativeModules, { server, port, user, password, database }): any;
query(pool: any, sql: string): Promise<QueryResult>;
stream(pool: any, sql: string, options: StreamOptions);
getVersion(pool: any): Promise<{ version: string }>;
listDatabases(
pool: any