autodetect jsonrow cell data view for nosql databases

This commit is contained in:
Jan Prochazka
2021-04-18 20:20:31 +02:00
parent 29aa59771c
commit 484aa932d3
2 changed files with 4 additions and 0 deletions

View File

@@ -27,6 +27,9 @@
];
function autodetect(selection) {
if (selection[0]?.engine?.dialect?.nosql) {
return 'jsonRow';
}
const value = selection.length == 1 ? selection[0].value : null;
if (_.isString(value)) {
if (value.startsWith('[') || value.startsWith('{')) return 'json';