custom joins working on the same DB

This commit is contained in:
Jan Prochazka
2022-07-31 21:09:58 +02:00
parent b05d260caa
commit cb5cce2ea3

View File

@@ -551,18 +551,20 @@ export class PerspectiveCustomJoinTreeNode extends PerspectiveTableNode {
}
getChildMatchColumns() {
return this.customJoin.columns.map(x => x.refColumnName);
}
getParentMatchColumns() {
return this.customJoin.columns.map(x => x.baseColumnName);
}
getParentMatchColumns() {
return this.customJoin.columns.map(x => x.refColumnName);
}
getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps {
// console.log('CUSTOM JOIN', this.customJoin);
// console.log('this.getDataLoadColumns()', this.getDataLoadColumns());
return {
schemaName: this.table.schemaName,
pureName: this.table.pureName,
bindingColumns: this.getChildMatchColumns(),
bindingColumns: this.getParentMatchColumns(),
bindingValues: _uniqBy(
parentRows.map(row => this.customJoin.columns.map(x => row[x.baseColumnName])),
stableStringify