mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 04:26:01 +00:00
feat: look into cursor's firstBatch in mongosh res
This commit is contained in:
@@ -103,6 +103,8 @@ const driver = {
|
||||
return printable;
|
||||
} else if ('documents' in printable) {
|
||||
return printable.documents;
|
||||
} else if ('cursor' in printable && 'firstBatch' in printable.cursor) {
|
||||
return printable.cursor.firstBatch;
|
||||
}
|
||||
|
||||
return printable;
|
||||
@@ -169,6 +171,11 @@ const driver = {
|
||||
for (const row of printable.documents) {
|
||||
options.row(row);
|
||||
}
|
||||
} else if ('cursor' in printable && 'firstBatch' in printable.cursor) {
|
||||
options.recordset({ __isDynamicStructure: true });
|
||||
for (const row of printable.cursor.firstBatch) {
|
||||
options.row(row);
|
||||
}
|
||||
} else {
|
||||
options.info({
|
||||
printable: printable,
|
||||
|
||||
Reference in New Issue
Block a user