dbgate-datalib 5.0.9 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/FreeTableGridDisplay.d.ts +8 -4
- package/lib/GridDisplay.d.ts +1 -1
- package/lib/PerspectiveCache.d.ts +39 -0
- package/lib/PerspectiveCache.js +99 -0
- package/lib/PerspectiveConfig.d.ts +63 -0
- package/lib/PerspectiveConfig.js +30 -0
- package/lib/PerspectiveDataLoader.d.ts +9 -0
- package/lib/PerspectiveDataLoader.js +136 -0
- package/lib/PerspectiveDataProvider.d.ts +42 -0
- package/lib/PerspectiveDataProvider.js +179 -0
- package/lib/PerspectiveDisplay.d.ts +55 -0
- package/lib/PerspectiveDisplay.js +223 -0
- package/lib/PerspectiveTreeNode.d.ts +146 -0
- package/lib/PerspectiveTreeNode.js +727 -0
- package/lib/TableGridDisplay.d.ts +8 -4
- package/lib/ViewGridDisplay.d.ts +8 -4
- package/lib/getPerspectiveDefaultColumns.d.ts +2 -0
- package/lib/getPerspectiveDefaultColumns.js +30 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +11 -1
- package/lib/tests/PerspectiveDisplay.test.d.ts +1 -0
- package/lib/tests/PerspectiveDisplay.test.js +79 -0
- package/lib/tests/artistDataAlbum.d.ts +20 -0
- package/lib/tests/artistDataAlbum.js +58 -0
- package/lib/tests/artistDataAlbumTrack.d.ts +20 -0
- package/lib/tests/artistDataAlbumTrack.js +79 -0
- package/lib/tests/artistDataFlat.d.ts +10 -0
- package/lib/tests/artistDataFlat.js +23 -0
- package/lib/tests/chinookDbInfo.d.ts +2 -0
- package/lib/tests/chinookDbInfo.js +1775 -0
- package/package.json +9 -4
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { PerspectiveTreeNode } from './PerspectiveTreeNode';
|
|
2
|
+
export declare class PerspectiveDisplayColumn {
|
|
3
|
+
display: PerspectiveDisplay;
|
|
4
|
+
title: string;
|
|
5
|
+
dataField: string;
|
|
6
|
+
parentNodes: PerspectiveTreeNode[];
|
|
7
|
+
colSpanAtLevel: {};
|
|
8
|
+
columnIndex: number;
|
|
9
|
+
dataNode: PerspectiveTreeNode;
|
|
10
|
+
constructor(display: PerspectiveDisplay);
|
|
11
|
+
get rowSpan(): number;
|
|
12
|
+
showParent(level: number): boolean;
|
|
13
|
+
getColSpan(level: number): any;
|
|
14
|
+
isVisible(level: number): boolean;
|
|
15
|
+
get columnLevel(): number;
|
|
16
|
+
getParentName(level: any): any;
|
|
17
|
+
getParentNode(level: any): PerspectiveTreeNode;
|
|
18
|
+
getParentTableUniqueName(level: any): any;
|
|
19
|
+
}
|
|
20
|
+
interface PerspectiveSubRowCollection {
|
|
21
|
+
rows: CollectedPerspectiveDisplayRow[];
|
|
22
|
+
}
|
|
23
|
+
interface CollectedPerspectiveDisplayRow {
|
|
24
|
+
columnIndexes: number[];
|
|
25
|
+
rowData: any[];
|
|
26
|
+
subRowCollections: PerspectiveSubRowCollection[];
|
|
27
|
+
incompleteRowsIndicator?: string[];
|
|
28
|
+
}
|
|
29
|
+
export declare class PerspectiveDisplayRow {
|
|
30
|
+
display: PerspectiveDisplay;
|
|
31
|
+
constructor(display: PerspectiveDisplay);
|
|
32
|
+
rowData: any[];
|
|
33
|
+
rowSpans: number[];
|
|
34
|
+
rowCellSkips: boolean[];
|
|
35
|
+
rowJoinIds: number[];
|
|
36
|
+
}
|
|
37
|
+
export declare class PerspectiveDisplay {
|
|
38
|
+
root: PerspectiveTreeNode;
|
|
39
|
+
columns: PerspectiveDisplayColumn[];
|
|
40
|
+
rows: PerspectiveDisplayRow[];
|
|
41
|
+
readonly columnLevelCount: number;
|
|
42
|
+
loadIndicatorsCounts: {
|
|
43
|
+
[uniqueName: string]: number;
|
|
44
|
+
};
|
|
45
|
+
constructor(root: PerspectiveTreeNode, rows: any[]);
|
|
46
|
+
private getRowAt;
|
|
47
|
+
fillColumns(children: PerspectiveTreeNode[], parentNodes: PerspectiveTreeNode[]): void;
|
|
48
|
+
processColumn(node: PerspectiveTreeNode, parentNodes: PerspectiveTreeNode[]): void;
|
|
49
|
+
findColumnIndexFromNode(node: PerspectiveTreeNode): number;
|
|
50
|
+
collectRows(sourceRows: any[], nodes: PerspectiveTreeNode[]): CollectedPerspectiveDisplayRow[];
|
|
51
|
+
fillRowSpans(): void;
|
|
52
|
+
mergeRows(collectedRows: CollectedPerspectiveDisplayRow[]): void;
|
|
53
|
+
mergeRow(collectedRow: CollectedPerspectiveDisplayRow, rowIndex: number): number;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PerspectiveDisplay = exports.PerspectiveDisplayRow = exports.PerspectiveDisplayColumn = void 0;
|
|
7
|
+
const max_1 = __importDefault(require("lodash/max"));
|
|
8
|
+
const fill_1 = __importDefault(require("lodash/fill"));
|
|
9
|
+
const findIndex_1 = __importDefault(require("lodash/findIndex"));
|
|
10
|
+
const debug_1 = __importDefault(require("debug"));
|
|
11
|
+
const dbg = (0, debug_1.default)('dbgate:PerspectiveDisplay');
|
|
12
|
+
let lastJoinId = 0;
|
|
13
|
+
function getJoinId() {
|
|
14
|
+
lastJoinId += 1;
|
|
15
|
+
return lastJoinId;
|
|
16
|
+
}
|
|
17
|
+
class PerspectiveDisplayColumn {
|
|
18
|
+
constructor(display) {
|
|
19
|
+
this.display = display;
|
|
20
|
+
this.parentNodes = [];
|
|
21
|
+
this.colSpanAtLevel = {};
|
|
22
|
+
this.columnIndex = 0;
|
|
23
|
+
this.dataNode = null;
|
|
24
|
+
}
|
|
25
|
+
get rowSpan() {
|
|
26
|
+
return this.display.columnLevelCount - this.parentNodes.length;
|
|
27
|
+
}
|
|
28
|
+
showParent(level) {
|
|
29
|
+
return !!this.colSpanAtLevel[level];
|
|
30
|
+
}
|
|
31
|
+
getColSpan(level) {
|
|
32
|
+
return this.colSpanAtLevel[level];
|
|
33
|
+
}
|
|
34
|
+
isVisible(level) {
|
|
35
|
+
return level == this.columnLevel;
|
|
36
|
+
}
|
|
37
|
+
get columnLevel() {
|
|
38
|
+
return this.parentNodes.length;
|
|
39
|
+
}
|
|
40
|
+
getParentName(level) {
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = this.parentNodes[level]) === null || _a === void 0 ? void 0 : _a.title;
|
|
43
|
+
}
|
|
44
|
+
getParentNode(level) {
|
|
45
|
+
return this.parentNodes[level];
|
|
46
|
+
}
|
|
47
|
+
getParentTableUniqueName(level) {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return ((_a = this.parentNodes[level]) === null || _a === void 0 ? void 0 : _a.headerTableAttributes) ? (_b = this.parentNodes[level]) === null || _b === void 0 ? void 0 : _b.uniqueName : '';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.PerspectiveDisplayColumn = PerspectiveDisplayColumn;
|
|
53
|
+
class PerspectiveDisplayRow {
|
|
54
|
+
constructor(display) {
|
|
55
|
+
this.display = display;
|
|
56
|
+
this.rowData = [];
|
|
57
|
+
this.rowSpans = null;
|
|
58
|
+
this.rowCellSkips = null;
|
|
59
|
+
this.rowJoinIds = [];
|
|
60
|
+
this.rowData = (0, fill_1.default)(Array(display.columns.length), undefined);
|
|
61
|
+
this.rowSpans = (0, fill_1.default)(Array(display.columns.length), 1);
|
|
62
|
+
this.rowJoinIds = (0, fill_1.default)(Array(display.columns.length), 0);
|
|
63
|
+
this.rowCellSkips = (0, fill_1.default)(Array(display.columns.length), false);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.PerspectiveDisplayRow = PerspectiveDisplayRow;
|
|
67
|
+
class PerspectiveDisplay {
|
|
68
|
+
constructor(root, rows) {
|
|
69
|
+
this.root = root;
|
|
70
|
+
this.columns = [];
|
|
71
|
+
this.rows = [];
|
|
72
|
+
this.loadIndicatorsCounts = {};
|
|
73
|
+
// dbg('source rows', rows);
|
|
74
|
+
this.fillColumns(root.childNodes, [root]);
|
|
75
|
+
if (this.columns.length > 0) {
|
|
76
|
+
this.columns[0].colSpanAtLevel[0] = this.columns.length;
|
|
77
|
+
}
|
|
78
|
+
this.columnLevelCount = (0, max_1.default)(this.columns.map(x => x.parentNodes.length)) + 1;
|
|
79
|
+
const collectedRows = this.collectRows(rows, root.childNodes);
|
|
80
|
+
dbg('collected rows', collectedRows);
|
|
81
|
+
// console.log('COLLECTED', JSON.stringify(collectedRows, null, 2));
|
|
82
|
+
// this.mergeRows(collectedRows);
|
|
83
|
+
this.mergeRows(collectedRows);
|
|
84
|
+
// dbg('merged rows', this.rows);
|
|
85
|
+
// console.log(
|
|
86
|
+
// 'MERGED',
|
|
87
|
+
// this.rows.map(r =>
|
|
88
|
+
// r.incompleteRowsIndicator
|
|
89
|
+
// ? `************************************ ${r.incompleteRowsIndicator.join('|')}`
|
|
90
|
+
// : r.rowData.join('|')
|
|
91
|
+
// )
|
|
92
|
+
// );
|
|
93
|
+
}
|
|
94
|
+
getRowAt(rowIndex) {
|
|
95
|
+
while (this.rows.length <= rowIndex) {
|
|
96
|
+
this.rows.push(new PerspectiveDisplayRow(this));
|
|
97
|
+
}
|
|
98
|
+
return this.rows[rowIndex];
|
|
99
|
+
}
|
|
100
|
+
fillColumns(children, parentNodes) {
|
|
101
|
+
for (const child of children) {
|
|
102
|
+
if (child.isChecked) {
|
|
103
|
+
this.processColumn(child, parentNodes);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
processColumn(node, parentNodes) {
|
|
108
|
+
if (node.isExpandable) {
|
|
109
|
+
const countBefore = this.columns.length;
|
|
110
|
+
this.fillColumns(node.childNodes, [...parentNodes, node]);
|
|
111
|
+
if (this.columns.length > countBefore) {
|
|
112
|
+
this.columns[countBefore].colSpanAtLevel[parentNodes.length] = this.columns.length - countBefore;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const column = new PerspectiveDisplayColumn(this);
|
|
117
|
+
column.title = node.columnTitle;
|
|
118
|
+
column.dataField = node.dataField;
|
|
119
|
+
column.parentNodes = parentNodes;
|
|
120
|
+
column.display = this;
|
|
121
|
+
column.columnIndex = this.columns.length;
|
|
122
|
+
column.dataNode = node;
|
|
123
|
+
this.columns.push(column);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
findColumnIndexFromNode(node) {
|
|
127
|
+
return (0, findIndex_1.default)(this.columns, x => x.dataNode.uniqueName == node.uniqueName);
|
|
128
|
+
}
|
|
129
|
+
collectRows(sourceRows, nodes) {
|
|
130
|
+
const columnNodes = nodes.filter(x => x.isChecked && !x.isExpandable);
|
|
131
|
+
const treeNodes = nodes.filter(x => x.isChecked && x.isExpandable);
|
|
132
|
+
const columnIndexes = columnNodes.map(node => this.findColumnIndexFromNode(node));
|
|
133
|
+
const res = [];
|
|
134
|
+
for (const sourceRow of sourceRows) {
|
|
135
|
+
// console.log('PROCESS SOURCE', sourceRow);
|
|
136
|
+
// row.startIndex = startIndex;
|
|
137
|
+
const rowData = columnNodes.map(node => sourceRow[node.codeName]);
|
|
138
|
+
const subRowCollections = [];
|
|
139
|
+
for (const node of treeNodes) {
|
|
140
|
+
if (sourceRow[node.fieldName]) {
|
|
141
|
+
const subrows = {
|
|
142
|
+
rows: this.collectRows(sourceRow[node.fieldName], node.childNodes),
|
|
143
|
+
};
|
|
144
|
+
subRowCollections.push(subrows);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
res.push({
|
|
148
|
+
rowData,
|
|
149
|
+
columnIndexes,
|
|
150
|
+
subRowCollections,
|
|
151
|
+
incompleteRowsIndicator: sourceRow.incompleteRowsIndicator,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return res;
|
|
155
|
+
}
|
|
156
|
+
fillRowSpans() {
|
|
157
|
+
for (let col = 0; col < this.columns.length; col++) {
|
|
158
|
+
// let lastFilledJoinId = null;
|
|
159
|
+
let lastFilledRow = 0;
|
|
160
|
+
let rowIndex = 0;
|
|
161
|
+
for (const row of this.rows) {
|
|
162
|
+
if (row.rowData[col] === undefined &&
|
|
163
|
+
row.rowJoinIds[col] == this.rows[lastFilledRow].rowJoinIds[col] &&
|
|
164
|
+
row.rowJoinIds[col]) {
|
|
165
|
+
row.rowCellSkips[col] = true;
|
|
166
|
+
this.rows[lastFilledRow].rowSpans[col] = rowIndex - lastFilledRow + 1;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
lastFilledRow = rowIndex;
|
|
170
|
+
}
|
|
171
|
+
rowIndex++;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
mergeRows(collectedRows) {
|
|
176
|
+
let rowIndex = 0;
|
|
177
|
+
for (const collectedRow of collectedRows) {
|
|
178
|
+
const count = this.mergeRow(collectedRow, rowIndex);
|
|
179
|
+
rowIndex += count;
|
|
180
|
+
}
|
|
181
|
+
this.fillRowSpans();
|
|
182
|
+
}
|
|
183
|
+
mergeRow(collectedRow, rowIndex) {
|
|
184
|
+
var _a;
|
|
185
|
+
if (((_a = collectedRow.incompleteRowsIndicator) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
186
|
+
for (const indicator of collectedRow.incompleteRowsIndicator) {
|
|
187
|
+
if (!this.loadIndicatorsCounts[indicator]) {
|
|
188
|
+
this.loadIndicatorsCounts[indicator] = rowIndex;
|
|
189
|
+
}
|
|
190
|
+
if (rowIndex < this.loadIndicatorsCounts[indicator]) {
|
|
191
|
+
this.loadIndicatorsCounts[indicator] = rowIndex;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return 0;
|
|
195
|
+
}
|
|
196
|
+
const mainRow = this.getRowAt(rowIndex);
|
|
197
|
+
for (let i = 0; i < collectedRow.columnIndexes.length; i++) {
|
|
198
|
+
mainRow.rowData[collectedRow.columnIndexes[i]] = collectedRow.rowData[i];
|
|
199
|
+
}
|
|
200
|
+
let rowCount = 1;
|
|
201
|
+
for (const subrows of collectedRow.subRowCollections) {
|
|
202
|
+
let additionalRowCount = 0;
|
|
203
|
+
let currentRowIndex = rowIndex;
|
|
204
|
+
for (const subrow of subrows.rows) {
|
|
205
|
+
const count = this.mergeRow(subrow, currentRowIndex);
|
|
206
|
+
additionalRowCount += count;
|
|
207
|
+
currentRowIndex += count;
|
|
208
|
+
}
|
|
209
|
+
if (additionalRowCount > rowCount) {
|
|
210
|
+
rowCount = additionalRowCount;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const joinId = getJoinId();
|
|
214
|
+
for (let radd = 0; radd < rowCount; radd++) {
|
|
215
|
+
const row = this.getRowAt(rowIndex + radd);
|
|
216
|
+
for (let i = 0; i < collectedRow.columnIndexes.length; i++) {
|
|
217
|
+
row.rowJoinIds[collectedRow.columnIndexes[i]] = joinId;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return rowCount;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.PerspectiveDisplay = PerspectiveDisplay;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { ColumnInfo, DatabaseInfo, ForeignKeyInfo, NamedObjectInfo, TableInfo, ViewInfo } from 'dbgate-types';
|
|
2
|
+
import { ChangePerspectiveConfigFunc, MultipleDatabaseInfo, PerspectiveConfig, PerspectiveConfigColumns, PerspectiveCustomJoinConfig, PerspectiveFilterColumnInfo } from './PerspectiveConfig';
|
|
3
|
+
import { PerspectiveDatabaseConfig, PerspectiveDataLoadProps, PerspectiveDataProvider } from './PerspectiveDataProvider';
|
|
4
|
+
import { FilterType } from 'dbgate-filterparser/lib/types';
|
|
5
|
+
import { Condition } from 'dbgate-sqltree';
|
|
6
|
+
export interface PerspectiveDataLoadPropsWithNode {
|
|
7
|
+
props: PerspectiveDataLoadProps;
|
|
8
|
+
node: PerspectiveTreeNode;
|
|
9
|
+
}
|
|
10
|
+
export declare abstract class PerspectiveTreeNode {
|
|
11
|
+
dbs: MultipleDatabaseInfo;
|
|
12
|
+
config: PerspectiveConfig;
|
|
13
|
+
setConfig: ChangePerspectiveConfigFunc;
|
|
14
|
+
parentNode: PerspectiveTreeNode;
|
|
15
|
+
dataProvider: PerspectiveDataProvider;
|
|
16
|
+
databaseConfig: PerspectiveDatabaseConfig;
|
|
17
|
+
constructor(dbs: MultipleDatabaseInfo, config: PerspectiveConfig, setConfig: ChangePerspectiveConfigFunc, parentNode: PerspectiveTreeNode, dataProvider: PerspectiveDataProvider, databaseConfig: PerspectiveDatabaseConfig);
|
|
18
|
+
defaultChecked: boolean;
|
|
19
|
+
abstract get title(): any;
|
|
20
|
+
abstract get codeName(): any;
|
|
21
|
+
abstract get isExpandable(): any;
|
|
22
|
+
abstract get childNodes(): PerspectiveTreeNode[];
|
|
23
|
+
abstract get icon(): string;
|
|
24
|
+
get fieldName(): any;
|
|
25
|
+
get headerTableAttributes(): any;
|
|
26
|
+
get dataField(): any;
|
|
27
|
+
get tableCode(): any;
|
|
28
|
+
get namedObject(): NamedObjectInfo;
|
|
29
|
+
abstract getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
|
|
30
|
+
get isRoot(): boolean;
|
|
31
|
+
get rootNode(): PerspectiveTreeNode;
|
|
32
|
+
matchChildRow(parentRow: any, childRow: any): boolean;
|
|
33
|
+
hasTableCode(code: string): any;
|
|
34
|
+
get uniqueName(): any;
|
|
35
|
+
get level(): any;
|
|
36
|
+
get isExpanded(): boolean;
|
|
37
|
+
get isChecked(): boolean;
|
|
38
|
+
get columnTitle(): any;
|
|
39
|
+
get filterType(): FilterType;
|
|
40
|
+
get columnName(): any;
|
|
41
|
+
get customJoinConfig(): PerspectiveCustomJoinConfig;
|
|
42
|
+
get db(): DatabaseInfo;
|
|
43
|
+
getChildMatchColumns(): any[];
|
|
44
|
+
getParentMatchColumns(): any[];
|
|
45
|
+
parseFilterCondition(source?: any): any;
|
|
46
|
+
get childDataColumn(): any;
|
|
47
|
+
toggleExpanded(value?: boolean): void;
|
|
48
|
+
toggleChecked(value?: boolean): void;
|
|
49
|
+
includeInColumnSet(field: keyof PerspectiveConfigColumns, uniqueName: string, isIncluded: boolean): void;
|
|
50
|
+
getFilter(): string;
|
|
51
|
+
getDataLoadColumns(): any[];
|
|
52
|
+
getChildrenCondition(source?: any): Condition;
|
|
53
|
+
getOrderBy(table: TableInfo | ViewInfo): PerspectiveDataLoadProps['orderBy'];
|
|
54
|
+
getBaseTables(): any[];
|
|
55
|
+
getBaseTableFromThis(): any;
|
|
56
|
+
get filterInfo(): PerspectiveFilterColumnInfo;
|
|
57
|
+
findChildNodeByUniquePath(uniquePath: string[]): any;
|
|
58
|
+
findNodeByUniqueName(uniqueName: string): PerspectiveTreeNode;
|
|
59
|
+
get supportsParentFilter(): boolean;
|
|
60
|
+
get isParentFilter(): boolean;
|
|
61
|
+
buildParentFilterConditions(): Condition[];
|
|
62
|
+
getParentJoinCondition(alias: string, parentAlias: string): Condition[];
|
|
63
|
+
}
|
|
64
|
+
export declare class PerspectiveTableColumnNode extends PerspectiveTreeNode {
|
|
65
|
+
column: ColumnInfo;
|
|
66
|
+
table: TableInfo | ViewInfo;
|
|
67
|
+
foreignKey: ForeignKeyInfo;
|
|
68
|
+
refTable: TableInfo;
|
|
69
|
+
isView: boolean;
|
|
70
|
+
isTable: boolean;
|
|
71
|
+
constructor(column: ColumnInfo, table: TableInfo | ViewInfo, dbs: MultipleDatabaseInfo, config: PerspectiveConfig, setConfig: ChangePerspectiveConfigFunc, dataProvider: PerspectiveDataProvider, databaseConfig: PerspectiveDatabaseConfig, parentNode: PerspectiveTreeNode);
|
|
72
|
+
matchChildRow(parentRow: any, childRow: any): boolean;
|
|
73
|
+
getChildMatchColumns(): string[];
|
|
74
|
+
getParentMatchColumns(): string[];
|
|
75
|
+
getParentJoinCondition(alias: string, parentAlias: string): Condition[];
|
|
76
|
+
getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
|
|
77
|
+
get icon(): "img circular" | "img autoincrement" | "img foreign-key" | "img column";
|
|
78
|
+
get codeName(): string;
|
|
79
|
+
get columnName(): string;
|
|
80
|
+
get fieldName(): string;
|
|
81
|
+
get title(): string;
|
|
82
|
+
get isExpandable(): boolean;
|
|
83
|
+
get filterType(): FilterType;
|
|
84
|
+
get isCircular(): boolean;
|
|
85
|
+
get childNodes(): PerspectiveTreeNode[];
|
|
86
|
+
getBaseTableFromThis(): TableInfo;
|
|
87
|
+
get filterInfo(): PerspectiveFilterColumnInfo;
|
|
88
|
+
parseFilterCondition(source?: any): Condition;
|
|
89
|
+
get headerTableAttributes(): {
|
|
90
|
+
schemaName: string;
|
|
91
|
+
pureName: string;
|
|
92
|
+
conid: string;
|
|
93
|
+
database: string;
|
|
94
|
+
};
|
|
95
|
+
get tableCode(): string;
|
|
96
|
+
get namedObject(): NamedObjectInfo;
|
|
97
|
+
}
|
|
98
|
+
export declare class PerspectiveTableNode extends PerspectiveTreeNode {
|
|
99
|
+
table: TableInfo | ViewInfo;
|
|
100
|
+
dataProvider: PerspectiveDataProvider;
|
|
101
|
+
constructor(table: TableInfo | ViewInfo, dbs: MultipleDatabaseInfo, config: PerspectiveConfig, setConfig: ChangePerspectiveConfigFunc, dataProvider: PerspectiveDataProvider, databaseConfig: PerspectiveDatabaseConfig, parentNode: PerspectiveTreeNode);
|
|
102
|
+
getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
|
|
103
|
+
get codeName(): string;
|
|
104
|
+
get title(): string;
|
|
105
|
+
get isExpandable(): boolean;
|
|
106
|
+
get childNodes(): PerspectiveTreeNode[];
|
|
107
|
+
get icon(): string;
|
|
108
|
+
getBaseTableFromThis(): TableInfo | ViewInfo;
|
|
109
|
+
get headerTableAttributes(): {
|
|
110
|
+
schemaName: string;
|
|
111
|
+
pureName: string;
|
|
112
|
+
conid: string;
|
|
113
|
+
database: string;
|
|
114
|
+
};
|
|
115
|
+
get tableCode(): string;
|
|
116
|
+
get namedObject(): NamedObjectInfo;
|
|
117
|
+
}
|
|
118
|
+
export declare class PerspectiveTableReferenceNode extends PerspectiveTableNode {
|
|
119
|
+
foreignKey: ForeignKeyInfo;
|
|
120
|
+
dataProvider: PerspectiveDataProvider;
|
|
121
|
+
isMultiple: boolean;
|
|
122
|
+
constructor(foreignKey: ForeignKeyInfo, table: TableInfo, dbs: MultipleDatabaseInfo, config: PerspectiveConfig, setConfig: ChangePerspectiveConfigFunc, dataProvider: PerspectiveDataProvider, databaseConfig: PerspectiveDatabaseConfig, isMultiple: boolean, parentNode: PerspectiveTreeNode);
|
|
123
|
+
matchChildRow(parentRow: any, childRow: any): boolean;
|
|
124
|
+
getChildMatchColumns(): string[];
|
|
125
|
+
getParentMatchColumns(): string[];
|
|
126
|
+
getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
|
|
127
|
+
get columnTitle(): string;
|
|
128
|
+
get title(): string;
|
|
129
|
+
get codeName(): string;
|
|
130
|
+
getParentJoinCondition(alias: string, parentAlias: string): Condition[];
|
|
131
|
+
}
|
|
132
|
+
export declare class PerspectiveCustomJoinTreeNode extends PerspectiveTableNode {
|
|
133
|
+
customJoin: PerspectiveCustomJoinConfig;
|
|
134
|
+
dataProvider: PerspectiveDataProvider;
|
|
135
|
+
constructor(customJoin: PerspectiveCustomJoinConfig, table: TableInfo | ViewInfo, dbs: MultipleDatabaseInfo, config: PerspectiveConfig, setConfig: ChangePerspectiveConfigFunc, dataProvider: PerspectiveDataProvider, databaseConfig: PerspectiveDatabaseConfig, parentNode: PerspectiveTreeNode);
|
|
136
|
+
matchChildRow(parentRow: any, childRow: any): boolean;
|
|
137
|
+
getChildMatchColumns(): string[];
|
|
138
|
+
getParentMatchColumns(): string[];
|
|
139
|
+
getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps;
|
|
140
|
+
get title(): string;
|
|
141
|
+
get icon(): string;
|
|
142
|
+
get codeName(): string;
|
|
143
|
+
get customJoinConfig(): PerspectiveCustomJoinConfig;
|
|
144
|
+
getParentJoinCondition(alias: string, parentAlias: string): Condition[];
|
|
145
|
+
}
|
|
146
|
+
export declare function getTableChildPerspectiveNodes(table: TableInfo | ViewInfo, dbs: MultipleDatabaseInfo, config: PerspectiveConfig, setConfig: ChangePerspectiveConfigFunc, dataProvider: PerspectiveDataProvider, databaseConfig: PerspectiveDatabaseConfig, parentColumn: PerspectiveTreeNode): any[];
|