mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 10:16:03 +00:00
custom joins working on the same DB
This commit is contained in:
@@ -551,18 +551,20 @@ export class PerspectiveCustomJoinTreeNode extends PerspectiveTableNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getChildMatchColumns() {
|
getChildMatchColumns() {
|
||||||
return this.customJoin.columns.map(x => x.refColumnName);
|
|
||||||
}
|
|
||||||
|
|
||||||
getParentMatchColumns() {
|
|
||||||
return this.customJoin.columns.map(x => x.baseColumnName);
|
return this.customJoin.columns.map(x => x.baseColumnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getParentMatchColumns() {
|
||||||
|
return this.customJoin.columns.map(x => x.refColumnName);
|
||||||
|
}
|
||||||
|
|
||||||
getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps {
|
getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps {
|
||||||
|
// console.log('CUSTOM JOIN', this.customJoin);
|
||||||
|
// console.log('this.getDataLoadColumns()', this.getDataLoadColumns());
|
||||||
return {
|
return {
|
||||||
schemaName: this.table.schemaName,
|
schemaName: this.table.schemaName,
|
||||||
pureName: this.table.pureName,
|
pureName: this.table.pureName,
|
||||||
bindingColumns: this.getChildMatchColumns(),
|
bindingColumns: this.getParentMatchColumns(),
|
||||||
bindingValues: _uniqBy(
|
bindingValues: _uniqBy(
|
||||||
parentRows.map(row => this.customJoin.columns.map(x => row[x.baseColumnName])),
|
parentRows.map(row => this.customJoin.columns.map(x => row[x.baseColumnName])),
|
||||||
stableStringify
|
stableStringify
|
||||||
|
|||||||
Reference in New Issue
Block a user