dbgate-tools 5.0.0 → 5.0.3
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/DatabaseAnalyser.d.ts +3 -0
- package/lib/DatabaseAnalyser.js +11 -0
- package/package.json +3 -3
|
@@ -17,9 +17,12 @@ export declare class DatabaseAnalyser {
|
|
|
17
17
|
incrementalAnalysis(structure: any): Promise<DatabaseInfo>;
|
|
18
18
|
mergeAnalyseResult(newlyAnalysed: any): any;
|
|
19
19
|
getRequestedObjectPureNames(objectTypeField: any, allPureNames: any): any;
|
|
20
|
+
containsObjectIdCondition(typeFields: any): boolean;
|
|
20
21
|
createQuery(template: any, typeFields: any): any;
|
|
22
|
+
createQueryCore(template: any, typeFields: any): any;
|
|
21
23
|
getDeletedObjectsForField(snapshot: any, objectTypeField: any): any;
|
|
22
24
|
getDeletedObjects(snapshot: any): any[];
|
|
25
|
+
feedback(obj: any): void;
|
|
23
26
|
getModifications(): Promise<any[]>;
|
|
24
27
|
safeQuery(sql: any): Promise<import("dbgate-types").QueryResult>;
|
|
25
28
|
static createEmptyStructure(): DatabaseInfo;
|
package/lib/DatabaseAnalyser.js
CHANGED
|
@@ -165,7 +165,13 @@ class DatabaseAnalyser {
|
|
|
165
165
|
// findObjectById(id) {
|
|
166
166
|
// return this.structure.tables.find((x) => x.objectId == id);
|
|
167
167
|
// }
|
|
168
|
+
containsObjectIdCondition(typeFields) {
|
|
169
|
+
return this.createQueryCore('=OBJECT_ID_CONDITION', typeFields) != ' is not null';
|
|
170
|
+
}
|
|
168
171
|
createQuery(template, typeFields) {
|
|
172
|
+
return this.createQueryCore(template, typeFields);
|
|
173
|
+
}
|
|
174
|
+
createQueryCore(template, typeFields) {
|
|
169
175
|
// let res = template;
|
|
170
176
|
if (this.singleObjectFilter) {
|
|
171
177
|
const { typeField } = this.singleObjectFilter;
|
|
@@ -216,6 +222,11 @@ class DatabaseAnalyser {
|
|
|
216
222
|
...this.getDeletedObjectsForField(snapshot, 'triggers'),
|
|
217
223
|
];
|
|
218
224
|
}
|
|
225
|
+
feedback(obj) {
|
|
226
|
+
if (this.pool.feedback) {
|
|
227
|
+
this.pool.feedback(obj);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
219
230
|
getModifications() {
|
|
220
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
232
|
const snapshot = yield this._getFastSnapshot();
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.0.
|
|
2
|
+
"version": "5.0.3",
|
|
3
3
|
"name": "dbgate-tools",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "lib/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^13.7.0",
|
|
28
|
-
"dbgate-types": "^5.0.
|
|
28
|
+
"dbgate-types": "^5.0.3",
|
|
29
29
|
"jest": "^24.9.0",
|
|
30
30
|
"ts-jest": "^25.2.1",
|
|
31
31
|
"typescript": "^4.4.3"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"lodash": "^4.17.21",
|
|
35
35
|
"dbgate-query-splitter": "^4.9.0",
|
|
36
|
-
"dbgate-sqltree": "^5.0.
|
|
36
|
+
"dbgate-sqltree": "^5.0.3",
|
|
37
37
|
"uuid": "^3.4.0"
|
|
38
38
|
}
|
|
39
39
|
}
|