mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 04:06:00 +00:00
autodetect jsonrow cell data view for nosql databases
This commit is contained in:
@@ -523,6 +523,7 @@
|
|||||||
rowData,
|
rowData,
|
||||||
column,
|
column,
|
||||||
value: rowData && rowData[column],
|
value: rowData && rowData[column],
|
||||||
|
engine: display?.driver,
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter(x => x.column);
|
.filter(x => x.column);
|
||||||
|
|||||||
@@ -27,6 +27,9 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
function autodetect(selection) {
|
function autodetect(selection) {
|
||||||
|
if (selection[0]?.engine?.dialect?.nosql) {
|
||||||
|
return 'jsonRow';
|
||||||
|
}
|
||||||
const value = selection.length == 1 ? selection[0].value : null;
|
const value = selection.length == 1 ? selection[0].value : null;
|
||||||
if (_.isString(value)) {
|
if (_.isString(value)) {
|
||||||
if (value.startsWith('[') || value.startsWith('{')) return 'json';
|
if (value.startsWith('[') || value.startsWith('{')) return 'json';
|
||||||
|
|||||||
Reference in New Issue
Block a user