backend-plus 2.0.6 → 2.0.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.
@@ -257,7 +257,7 @@ export type ForeignKey = {
257
257
  export type Constraint = {constraintType:string, consName?:string} & (
258
258
  {constraintType:'unique', fields:string[], where?:string} |
259
259
  {constraintType:'check', expr?:string} |
260
- {constraintType:'exclude', using:'GIST', fields:(string|{fieldName:string, operator:'='|'&&'})[]}
260
+ {constraintType:'exclude', using:'GIST', fields:(string|{fieldName:string, operator:'='|'&&'})[], where?:string}
261
261
  )
262
262
  export type OtherTableDefs = Record<string,Partial<TableDefinition & {prefilledField:Record<string,any>}>>
263
263
  export type TableDefinition = EditableDbDefinition & {
@@ -2863,7 +2863,7 @@ AppBackend.prototype.dumpDbSchemaPartial = async function dumpDbSchemaPartial(pa
2863
2863
  sql='check ('+cons.expr+')';
2864
2864
  break;
2865
2865
  case 'exclude':
2866
- sql=`exclude using ${cons.using} (${cons.fields.map(f => typeof f == "string"?`${f} WITH =`:`${f.fieldName} WITH ${f.operator}`).join(', ')})`;
2866
+ sql=`exclude using ${cons.using} (${cons.fields.map(f => typeof f == "string"?`${f} WITH =`:`${f.fieldName} WITH ${f.operator}`).join(', ')})${cons.where ? ` WHERE (${cons.where})`:``}`;
2867
2867
  break;
2868
2868
  default:
2869
2869
  throw new Error('constraintType not implemented: '+cons.constraintType);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for the anti Pareto rule",
4
- "version": "2.0.6",
4
+ "version": "2.0.8",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",
@@ -69,7 +69,7 @@
69
69
  "sql-tools": "^0.1.2",
70
70
  "stack-trace": "^0.0.10",
71
71
  "stylus": "0.64.0",
72
- "type-store": "^0.4.4",
72
+ "type-store": "^0.4.5",
73
73
  "typed-controls": "^0.12.2",
74
74
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
75
75
  },
@@ -80,10 +80,10 @@
80
80
  "@types/express-useragent": "^1.0.5",
81
81
  "@types/fs-extra": "^11.0.4",
82
82
  "@types/js-yaml": "^4.0.9",
83
- "@types/mocha": "^10.0.9",
83
+ "@types/mocha": "^10.0.10",
84
84
  "@types/multiparty": "~4.2.1",
85
- "@types/node": "^22.9.0",
86
- "@types/nodemailer": "^6.4.16",
85
+ "@types/node": "^22.9.3",
86
+ "@types/nodemailer": "^6.4.17",
87
87
  "@types/numeral": "~2.0.5",
88
88
  "@types/session-file-store": "^1.2.5",
89
89
  "@types/stack-trace": "~0.0.33",
@@ -99,11 +99,11 @@
99
99
  "kill-9": "~0.4.3",
100
100
  "mocha": "^10.8.2",
101
101
  "nyc": "^17.1.0",
102
- "puppeteer": "^23.7.1",
102
+ "puppeteer": "^23.9.0",
103
103
  "sinon": "^19.0.2",
104
104
  "supertest": "^7.0.0",
105
- "types.d.ts": "~0.6.21",
106
- "typescript": "^5.6.3",
105
+ "types.d.ts": "~0.6.22",
106
+ "typescript": "^5.7.2",
107
107
  "why-is-node-running": "^3.2.1"
108
108
  },
109
109
  "engines": {