dbgate-datalib 6.6.8-alpha.8 → 6.6.8
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.
|
@@ -14,10 +14,11 @@ export declare class TableGridDisplay extends GridDisplay {
|
|
|
14
14
|
getDictionaryDescription: DictionaryDescriptionFunc;
|
|
15
15
|
isRawMode: boolean;
|
|
16
16
|
currentSettings: any;
|
|
17
|
+
areReferencesAllowed: boolean;
|
|
17
18
|
table: TableInfo;
|
|
18
19
|
addAllExpandedColumnsToSelected: boolean;
|
|
19
20
|
hintBaseColumns: DisplayColumn[];
|
|
20
|
-
constructor(tableName: NamedObjectInfo, driver: EngineDriver, config: GridConfig, setConfig: ChangeConfigFunc, cache: GridCache, setCache: ChangeCacheFunc, dbinfo: DatabaseInfo, displayOptions: any, serverVersion: any, getDictionaryDescription?: DictionaryDescriptionFunc, isReadOnly?: boolean, isRawMode?: boolean, currentSettings?: any);
|
|
21
|
+
constructor(tableName: NamedObjectInfo, driver: EngineDriver, config: GridConfig, setConfig: ChangeConfigFunc, cache: GridCache, setCache: ChangeCacheFunc, dbinfo: DatabaseInfo, displayOptions: any, serverVersion: any, getDictionaryDescription?: DictionaryDescriptionFunc, isReadOnly?: boolean, isRawMode?: boolean, currentSettings?: any, areReferencesAllowed?: boolean);
|
|
21
22
|
addFormDisplayColumns(columns: any): void;
|
|
22
23
|
findTable({ schemaName, pureName }: {
|
|
23
24
|
schemaName?: any;
|
package/lib/TableGridDisplay.js
CHANGED
|
@@ -4,13 +4,14 @@ exports.TableGridDisplay = void 0;
|
|
|
4
4
|
const dbgate_tools_1 = require("dbgate-tools");
|
|
5
5
|
const GridDisplay_1 = require("./GridDisplay");
|
|
6
6
|
class TableGridDisplay extends GridDisplay_1.GridDisplay {
|
|
7
|
-
constructor(tableName, driver, config, setConfig, cache, setCache, dbinfo, displayOptions, serverVersion, getDictionaryDescription = null, isReadOnly = false, isRawMode = false, currentSettings = null) {
|
|
7
|
+
constructor(tableName, driver, config, setConfig, cache, setCache, dbinfo, displayOptions, serverVersion, getDictionaryDescription = null, isReadOnly = false, isRawMode = false, currentSettings = null, areReferencesAllowed = true) {
|
|
8
8
|
super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion, currentSettings);
|
|
9
9
|
this.tableName = tableName;
|
|
10
10
|
this.displayOptions = displayOptions;
|
|
11
11
|
this.getDictionaryDescription = getDictionaryDescription;
|
|
12
12
|
this.isRawMode = isRawMode;
|
|
13
13
|
this.currentSettings = currentSettings;
|
|
14
|
+
this.areReferencesAllowed = areReferencesAllowed;
|
|
14
15
|
this.addAllExpandedColumnsToSelected = false;
|
|
15
16
|
this.table = this.findTable(tableName);
|
|
16
17
|
if (!this.table) {
|
|
@@ -181,6 +182,8 @@ class TableGridDisplay extends GridDisplay_1.GridDisplay {
|
|
|
181
182
|
return this.findTable({ schemaName, pureName });
|
|
182
183
|
}
|
|
183
184
|
processReferences(select, displayedColumnInfo, options) {
|
|
185
|
+
if (!this.areReferencesAllowed)
|
|
186
|
+
return;
|
|
184
187
|
this.addJoinsFromExpandedColumns(select, this.columns, 'basetbl', displayedColumnInfo);
|
|
185
188
|
if (!options.isExport && this.displayOptions.showHintColumns) {
|
|
186
189
|
this.addHintsToSelect(select);
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "6.6.8
|
|
2
|
+
"version": "6.6.8",
|
|
3
3
|
"name": "dbgate-datalib",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "lib/index.d.ts",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"date-fns": "^4.1.0",
|
|
22
|
-
"dbgate-filterparser": "^6.6.8
|
|
23
|
-
"dbgate-sqltree": "^6.6.8
|
|
24
|
-
"dbgate-tools": "^6.6.8
|
|
22
|
+
"dbgate-filterparser": "^6.6.8",
|
|
23
|
+
"dbgate-sqltree": "^6.6.8",
|
|
24
|
+
"dbgate-tools": "^6.6.8",
|
|
25
25
|
"uuid": "^3.4.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^13.7.0",
|
|
29
|
-
"dbgate-types": "^6.6.8
|
|
29
|
+
"dbgate-types": "^6.6.8",
|
|
30
30
|
"jest": "^28.1.3",
|
|
31
31
|
"ts-jest": "^28.0.7",
|
|
32
32
|
"typescript": "^4.4.3"
|