perspectives: support nosql other than mongo

This commit is contained in:
SPRINX0\prochazka
2024-08-28 15:49:32 +02:00
parent 73ec42a9c8
commit d243af323e
3 changed files with 14 additions and 5 deletions

View File

@@ -463,6 +463,8 @@ export abstract class PerspectiveTreeNode {
order: 'ASC' as 'ASC',
}));
if (pkColumns) return pkColumns;
const uqColumns = (table as CollectionInfo)?.uniqueKey;
if (uqColumns?.length >= 1) return uqColumns.map(x => ({ columnName: x.columnName, order: 'ASC' }));
const columns = (table as TableInfo | ViewInfo)?.columns;
if (columns) return [{ columnName: columns[0].columnName, order: 'ASC' }];
return [{ columnName: '_id', order: 'ASC' }];