mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 16:36:00 +00:00
better type habndling, shell-tableReader for preserving table structure
This commit is contained in:
@@ -85,7 +85,7 @@ const driver = {
|
||||
|
||||
return query;
|
||||
},
|
||||
async readQuery(connection, sql) {
|
||||
async readQuery(connection, sql, structure) {
|
||||
const query = connection.query(sql);
|
||||
const { stream } = connection._nativeModules;
|
||||
|
||||
@@ -99,7 +99,7 @@ const driver = {
|
||||
console.error(err);
|
||||
pass.end();
|
||||
})
|
||||
.on('fields', (fields) => pass.write({ columns: extractColumns(fields) }))
|
||||
.on('fields', (fields) => pass.write(structure || { columns: extractColumns(fields) }))
|
||||
.on('result', (row) => pass.write(row))
|
||||
.on('end', () => pass.end());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user