dbgate-datalib 5.4.5-alpha.5 → 5.5.1
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/GridDisplay.d.ts +1 -1
- package/lib/GridDisplay.js +5 -5
- package/lib/TableGridDisplay.js +1 -1
- package/package.json +5 -5
package/lib/GridDisplay.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ export declare abstract class GridDisplay {
|
|
|
111
111
|
getChangeSetRow(row: any, insertedRowIndex: any, existingRowIndex: any, baseNameOmitable?: boolean): ChangeSetRowDefinition;
|
|
112
112
|
createSelect(options?: {}): Select;
|
|
113
113
|
processReferences(select: Select, displayedColumnInfo: DisplayedColumnInfo, options: any): void;
|
|
114
|
-
createColumnExpression(col: any, source: any, alias?: any): any;
|
|
114
|
+
createColumnExpression(col: any, source: any, alias?: any, purpose?: 'view' | 'filter'): any;
|
|
115
115
|
createSelectBase(name: NamedObjectInfo, columns: ColumnInfo[], options: any, defaultOrderColumnName?: string): Select;
|
|
116
116
|
getRowNumberOverSelect(select: Select, offset: number, count: number): Select;
|
|
117
117
|
getPageQuery(offset: number, count: number): Select;
|
package/lib/GridDisplay.js
CHANGED
|
@@ -135,7 +135,7 @@ class GridDisplay {
|
|
|
135
135
|
if (condition) {
|
|
136
136
|
conditions.push(lodash_1.default.cloneDeepWith(condition, (expr) => {
|
|
137
137
|
if (expr.exprType == 'placeholder') {
|
|
138
|
-
return this.createColumnExpression(column, { alias: column.sourceAlias });
|
|
138
|
+
return this.createColumnExpression(column, { alias: column.sourceAlias }, undefined, 'filter');
|
|
139
139
|
}
|
|
140
140
|
// return {
|
|
141
141
|
// exprType: 'column',
|
|
@@ -161,7 +161,7 @@ class GridDisplay {
|
|
|
161
161
|
if (condition) {
|
|
162
162
|
orCondition.conditions.push(lodash_1.default.cloneDeepWith(condition, (expr) => {
|
|
163
163
|
if (expr.exprType == 'placeholder') {
|
|
164
|
-
return this.createColumnExpression(column, { alias: 'basetbl' });
|
|
164
|
+
return this.createColumnExpression(column, { alias: 'basetbl' }, undefined, 'filter');
|
|
165
165
|
}
|
|
166
166
|
}));
|
|
167
167
|
}
|
|
@@ -397,10 +397,10 @@ class GridDisplay {
|
|
|
397
397
|
return null;
|
|
398
398
|
}
|
|
399
399
|
processReferences(select, displayedColumnInfo, options) { }
|
|
400
|
-
createColumnExpression(col, source, alias) {
|
|
400
|
+
createColumnExpression(col, source, alias, purpose = 'view') {
|
|
401
401
|
let expr = null;
|
|
402
402
|
if (this.dialect.createColumnViewExpression) {
|
|
403
|
-
expr = this.dialect.createColumnViewExpression(col.columnName, col.dataType, source, alias);
|
|
403
|
+
expr = this.dialect.createColumnViewExpression(col.columnName, col.dataType, source, alias, purpose);
|
|
404
404
|
if (expr) {
|
|
405
405
|
return expr;
|
|
406
406
|
}
|
|
@@ -418,7 +418,7 @@ class GridDisplay {
|
|
|
418
418
|
name: lodash_1.default.pick(name, ['schemaName', 'pureName']),
|
|
419
419
|
alias: 'basetbl',
|
|
420
420
|
},
|
|
421
|
-
columns: columns.map(col => this.createColumnExpression(col, { alias: 'basetbl' })),
|
|
421
|
+
columns: columns.map(col => this.createColumnExpression(col, { alias: 'basetbl' }, undefined, 'view')),
|
|
422
422
|
orderBy: ((_b = this.driver) === null || _b === void 0 ? void 0 : _b.requiresDefaultSortCriteria)
|
|
423
423
|
? [
|
|
424
424
|
{
|
package/lib/TableGridDisplay.js
CHANGED
|
@@ -205,7 +205,7 @@ class TableGridDisplay extends GridDisplay_1.GridDisplay {
|
|
|
205
205
|
addAddedColumnsToSelect(select, columns, parentAlias, displayedColumnInfo) {
|
|
206
206
|
for (const column of columns) {
|
|
207
207
|
if (this.addAllExpandedColumnsToSelected || this.config.addedColumns.includes(column.uniqueName)) {
|
|
208
|
-
select.columns.push(this.createColumnExpression(column, { name: column, alias: parentAlias }, column.uniqueName));
|
|
208
|
+
select.columns.push(this.createColumnExpression(column, { name: column, alias: parentAlias }, column.uniqueName, 'view'));
|
|
209
209
|
displayedColumnInfo[column.uniqueName] = Object.assign(Object.assign({}, column), { sourceAlias: parentAlias });
|
|
210
210
|
}
|
|
211
211
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.
|
|
2
|
+
"version": "5.5.1",
|
|
3
3
|
"name": "dbgate-datalib",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "lib/index.d.ts",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"lib"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"dbgate-sqltree": "^5.
|
|
17
|
-
"dbgate-tools": "^5.
|
|
18
|
-
"dbgate-filterparser": "^5.
|
|
16
|
+
"dbgate-sqltree": "^5.5.1",
|
|
17
|
+
"dbgate-tools": "^5.5.1",
|
|
18
|
+
"dbgate-filterparser": "^5.5.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"dbgate-types": "^5.
|
|
21
|
+
"dbgate-types": "^5.5.1",
|
|
22
22
|
"@types/node": "^13.7.0",
|
|
23
23
|
"jest": "^28.1.3",
|
|
24
24
|
"ts-jest": "^28.0.7",
|