mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
rename
This commit is contained in:
parent
dc7c44b797
commit
a86f7e96ca
@ -8,7 +8,7 @@ async function queryReader({ connection, sql }) {
|
||||
const driver = engines(connection);
|
||||
const pool = await driverConnect(driver, connection);
|
||||
console.log(`Connected.`);
|
||||
return await driver.readableStream(pool, sql);
|
||||
return await driver.readQuery(pool, sql);
|
||||
}
|
||||
|
||||
module.exports = queryReader;
|
||||
|
@ -154,7 +154,7 @@ const driver = {
|
||||
|
||||
return request;
|
||||
},
|
||||
async readableStream(pool, sql) {
|
||||
async readQuery(pool, sql) {
|
||||
const request = await pool.request();
|
||||
const { stream } = pool._nativeModules;
|
||||
|
||||
|
@ -84,7 +84,7 @@ const driver = {
|
||||
|
||||
return query;
|
||||
},
|
||||
async readableStream(connection, sql) {
|
||||
async readQuery(connection, sql) {
|
||||
const query = connection.query(sql);
|
||||
const { stream } = connection._nativeModules;
|
||||
|
||||
|
5
packages/types/engines.d.ts
vendored
5
packages/types/engines.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import stream from 'stream'
|
||||
import stream from 'stream';
|
||||
import { QueryResult } from './query';
|
||||
import { SqlDialect } from './dialect';
|
||||
import { SqlDumper } from './dumper';
|
||||
@ -17,7 +17,8 @@ export interface EngineDriver {
|
||||
connect(nativeModules, { server, port, user, password, database }): any;
|
||||
query(pool: any, sql: string): Promise<QueryResult>;
|
||||
stream(pool: any, sql: string, options: StreamOptions);
|
||||
readableStream(pool: any, sql: string): Promise<stream.Readable>;
|
||||
readQuery(pool: any, sql: string): Promise<stream.Readable>;
|
||||
writeTable(pool: any, { schemaName, pureName }): Promise<stream.Writeable>;
|
||||
getVersion(pool: any): Promise<{ version: string }>;
|
||||
listDatabases(
|
||||
pool: any
|
||||
|
Loading…
Reference in New Issue
Block a user