prostgles-server 2.0.309 → 2.0.311

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/DboBuilder.ts CHANGED
@@ -2605,16 +2605,6 @@ export class DboBuilder {
2605
2605
 
2606
2606
  // Validate joins
2607
2607
  try {
2608
- // 1 find duplicates
2609
- // const dup = joins.find(j =>
2610
- // j.tables[0] === j.tables[1] ||
2611
- // joins.find(jj =>
2612
- // j.tables.join() !== jj.tables.join() &&
2613
- // j.tables.slice().sort().join() === jj.tables.slice().sort().join())
2614
- // );
2615
- // if(dup){
2616
- // throw "Duplicate join declaration for table: " + dup.tables[0];
2617
- // }
2618
2608
  const tovNames = this.tablesOrViews!.map(t => t.name);
2619
2609
 
2620
2610
  // 2 find incorrect tables
@@ -2697,7 +2687,7 @@ export class DboBuilder {
2697
2687
 
2698
2688
  const existing1 = this.joinPaths.find(j => j.t1 === t1 && j.t2 === t2)
2699
2689
  if(!existing1){
2700
- this.joinPaths.push({ t1, t2, path: spath.path });
2690
+ this.joinPaths.push({ t1, t2, path: spath.path.slice() });
2701
2691
  }
2702
2692
 
2703
2693
  const existing2 = this.joinPaths.find(j => j.t2 === t1 && j.t1 === t2);
@@ -3301,7 +3291,7 @@ function sqlErrCodeToMsg(code: string){
3301
3291
  }
3302
3292
 
3303
3293
  const arrayValuesMatch = <T>(arr1: T[], arr2: T[]): boolean => {
3304
- return arr1.sort().join() === arr2.sort().join()
3294
+ return arr1.slice().sort().join() === arr2.slice().sort().join()
3305
3295
  }
3306
3296
 
3307
3297
  async function getInferredJoins2(schema: TableSchema[]): Promise<Join[]> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prostgles-server",
3
- "version": "2.0.309",
3
+ "version": "2.0.311",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1 +1 @@
1
- 30576
1
+ 41262
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "../..": {
23
23
  "name": "prostgles-server",
24
- "version": "2.0.308",
24
+ "version": "2.0.310",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@aws-sdk/client-s3": "^3.121.0",