perspective custom joins supports views

This commit is contained in:
Jan Prochazka
2022-08-06 17:03:48 +02:00
parent 86d7d61cc5
commit cc019281d4
3 changed files with 94 additions and 65 deletions

View File

@@ -25,7 +25,6 @@
PerspectiveDataProvider,
PerspectiveTableColumnNode,
PerspectiveTableNode,
PerspectiveViewNode,
} from 'dbgate-datalib';
import _ from 'lodash';
@@ -103,11 +102,18 @@
$: dataProvider = new PerspectiveDataProvider(cache, loader);
$: loader = new PerspectiveDataLoader(apiCall);
$: root = $tableInfo
? new PerspectiveTableNode($tableInfo, $dbInfos, config, setConfig, dataProvider, { conid, database }, null)
: $viewInfo
? new PerspectiveViewNode($viewInfo, $dbInfos, config, setConfig, dataProvider, { conid, database }, null)
: null;
$: root =
$tableInfo || $viewInfo
? new PerspectiveTableNode(
$tableInfo || $viewInfo,
$dbInfos,
config,
setConfig,
dataProvider,
{ conid, database },
null
)
: null;
// $: console.log('CONFIG', config);
</script>