pg-mvc-service 2.0.96 → 2.0.98

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.
@@ -530,7 +530,7 @@ class TableModel {
530
530
  const tables = [];
531
531
  for (const join of this.joinConditions) {
532
532
  tables.push(`${join.model.TableName} as "${join.model.TableAlias}"`);
533
- const query = WhereExpression_1.default.createCondition(join.conditions, this, this.vars.length);
533
+ const query = WhereExpression_1.default.createCondition(join.conditions, this, this.vars.length + 1);
534
534
  this.whereExpressions.push(query.expression);
535
535
  if (query.vars !== undefined) {
536
536
  this.vars = [...this.vars, ...query.vars];
@@ -552,7 +552,7 @@ class TableModel {
552
552
  const tables = [];
553
553
  for (const join of this.joinConditions) {
554
554
  tables.push(`${join.model.TableName} as "${join.model.TableAlias}"`);
555
- const query = WhereExpression_1.default.createCondition(join.conditions, this, this.vars.length);
555
+ const query = WhereExpression_1.default.createCondition(join.conditions, this, this.vars.length + 1);
556
556
  this.whereExpressions.push(query.expression);
557
557
  if (query.vars !== undefined) {
558
558
  this.vars = [...this.vars, ...query.vars];
@@ -219,7 +219,7 @@ class RequestType extends ReqResType_1.default {
219
219
  };
220
220
  let errorMessage = list[code];
221
221
  const property = this.getProperty(keys);
222
- switch (property.type) {
222
+ switch (property === null || property === void 0 ? void 0 : property.type) {
223
223
  case 'enum':
224
224
  case 'enum?':
225
225
  errorMessage = errorMessage.replace('{enums}', Object.keys((_a = property.enums) !== null && _a !== void 0 ? _a : '').join(','));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.96",
3
+ "version": "2.0.98",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -613,7 +613,7 @@ export class TableModel {
613
613
  for (const join of this.joinConditions) {
614
614
  tables.push(`${join.model.TableName} as "${join.model.TableAlias}"`);
615
615
 
616
- const query = WhereExpression.createCondition(join.conditions, this, this.vars.length);
616
+ const query = WhereExpression.createCondition(join.conditions, this, this.vars.length + 1);
617
617
  this.whereExpressions.push(query.expression);
618
618
  if (query.vars !== undefined) {
619
619
  this.vars = [...this.vars, ...query.vars]
@@ -638,7 +638,7 @@ export class TableModel {
638
638
  for (const join of this.joinConditions) {
639
639
  tables.push(`${join.model.TableName} as "${join.model.TableAlias}"`);
640
640
 
641
- const query = WhereExpression.createCondition(join.conditions, this, this.vars.length);
641
+ const query = WhereExpression.createCondition(join.conditions, this, this.vars.length + 1);
642
642
  this.whereExpressions.push(query.expression);
643
643
  if (query.vars !== undefined) {
644
644
  this.vars = [...this.vars, ...query.vars]
@@ -235,7 +235,7 @@ export class RequestType extends ReqResType {
235
235
 
236
236
  let errorMessage = list[code];
237
237
  const property = this.getProperty(keys);
238
- switch (property.type) {
238
+ switch (property?.type) {
239
239
  case 'enum':
240
240
  case 'enum?':
241
241
  errorMessage = errorMessage.replace('{enums}', Object.keys(property.enums ?? '').join(','));