dbgate-tools 7.0.2 → 7.0.4

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.
@@ -89,6 +89,7 @@ export declare class SqlDumper implements AlterProcessor {
89
89
  dropPrimaryKey(pk: PrimaryKeyInfo): void;
90
90
  createPrimaryKey(pk: PrimaryKeyInfo): void;
91
91
  dropIndex(ix: IndexInfo): void;
92
+ indexType(ix: IndexInfo): void;
92
93
  createIndex(ix: IndexInfo): void;
93
94
  dropUnique(uq: UniqueInfo): void;
94
95
  createUniqueCore(uq: UniqueInfo): void;
package/lib/SqlDumper.js CHANGED
@@ -501,10 +501,14 @@ class SqlDumper {
501
501
  }
502
502
  this.endCommand();
503
503
  }
504
+ indexType(ix) {
505
+ if (ix.isUnique) {
506
+ this.put(' ^unique');
507
+ }
508
+ }
504
509
  createIndex(ix) {
505
510
  this.put('^create');
506
- if (ix.isUnique)
507
- this.put(' ^unique');
511
+ this.indexType(ix);
508
512
  this.put(' ^index %i &n^on %f (&>&n', ix.constraintName, ix);
509
513
  this.putCollection(',&n', ix.columns, col => {
510
514
  this.put('%i %k', col.columnName, col.isDescending == true ? 'DESC' : 'ASC');
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.0.2",
2
+ "version": "7.0.4",
3
3
  "name": "dbgate-tools",
4
4
  "main": "lib/index.js",
5
5
  "typings": "lib/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "devDependencies": {
28
28
  "@types/node": "^13.7.0",
29
- "dbgate-types": "^7.0.2",
29
+ "dbgate-types": "^7.0.4",
30
30
  "jest": "^28.1.3",
31
31
  "ts-jest": "^28.0.7",
32
32
  "typescript": "^4.4.3"
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "blueimp-md5": "^2.19.0",
36
36
  "dbgate-query-splitter": "^4.11.9",
37
- "dbgate-sqltree": "^7.0.2",
37
+ "dbgate-sqltree": "^7.0.4",
38
38
  "debug": "^4.3.4",
39
39
  "json-stable-stringify": "^1.0.1",
40
40
  "lodash": "^4.17.21",