handle $oid

This commit is contained in:
Jan Prochazka
2022-12-30 12:24:05 +01:00
parent 380ab2e69e
commit d407c72f78
5 changed files with 35 additions and 5 deletions

View File

@@ -39,7 +39,11 @@ import { Condition, Expression, Select } from 'dbgate-sqltree';
// import { getPerspectiveDefaultColumns } from './getPerspectiveDefaultColumns';
import uuidv1 from 'uuid/v1';
import { PerspectiveDataPatternColumn } from './PerspectiveDataPattern';
import { getPerspectiveMostNestedChildColumnName, getPerspectiveParentColumnName } from './perspectiveTools';
import {
getPerspectiveMostNestedChildColumnName,
getPerspectiveParentColumnName,
perspectiveValueMatcher,
} from './perspectiveTools';
export interface PerspectiveDataLoadPropsWithNode {
props: PerspectiveDataLoadProps;
@@ -1248,9 +1252,14 @@ export class PerspectiveCustomJoinTreeNode extends PerspectiveTableNode {
}
matchChildRow(parentRow: any, childRow: any): boolean {
console.log('MATCH ROW', parentRow, childRow);
// console.log('MATCH ROW', parentRow, childRow);
for (const column of this.customJoin.columns) {
if (parentRow[getPerspectiveMostNestedChildColumnName(column.baseColumnName)] != childRow[column.refColumnName]) {
if (
!perspectiveValueMatcher(
parentRow[getPerspectiveMostNestedChildColumnName(column.baseColumnName)],
childRow[column.refColumnName]
)
) {
return false;
}
}