axe-api 0.20.0-rc21 → 0.20.0-rc22

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.
@@ -1,6 +1,6 @@
1
1
  export declare enum ConditionTypes {
2
2
  NotNull = "NotNull",
3
- Null = "NotNull",
3
+ Null = "Null",
4
4
  "=" = "=",
5
5
  "<>" = "<>",
6
6
  ">" = ">",
@@ -4,7 +4,7 @@ exports.TimestampColumns = exports.SortTypes = exports.Relationships = exports.L
4
4
  var ConditionTypes;
5
5
  (function (ConditionTypes) {
6
6
  ConditionTypes["NotNull"] = "NotNull";
7
- ConditionTypes["Null"] = "NotNull";
7
+ ConditionTypes["Null"] = "Null";
8
8
  ConditionTypes["="] = "=";
9
9
  ConditionTypes["<>"] = "<>";
10
10
  ConditionTypes[">"] = ">";
@@ -191,15 +191,15 @@ const getRelatedData = (data, withArray, model, modelList, database, handler, re
191
191
  // };
192
192
  // }),
193
193
  // ];
194
- console.log([
195
- ...workList.map((relationship) => {
196
- return {
197
- relationship,
198
- fields: [],
199
- children: [],
200
- };
201
- }),
202
- ]);
194
+ // console.log([
195
+ // ...workList.map((relationship) => {
196
+ // return {
197
+ // relationship,
198
+ // fields: [],
199
+ // children: [],
200
+ // };
201
+ // }),
202
+ // ]);
203
203
  // We should check if the column is defined on the table.
204
204
  const undefinedColumns = selectColumns.filter((column) => !foreignModel.columnNames.includes(column));
205
205
  if (undefinedColumns.length > 0) {
@@ -301,13 +301,16 @@ class QueryService {
301
301
  this.applySpecialCondition(where, "$between", Enums_1.ConditionTypes.Between);
302
302
  this.applySpecialCondition(where, "$notBetween", Enums_1.ConditionTypes.NotBetween);
303
303
  }
304
- if (where.condition === "In" || where.condition === "NotIn") {
304
+ if (where.condition === Enums_1.ConditionTypes.In ||
305
+ where.condition === Enums_1.ConditionTypes.NotIn) {
305
306
  where.value = where.value.split(",");
306
307
  }
307
- if (where.condition === "Between" || where.condition === "NotBetween") {
308
+ if (where.condition === Enums_1.ConditionTypes.Between ||
309
+ where.condition === Enums_1.ConditionTypes.NotBetween) {
308
310
  where.value = where.value.split(":");
309
311
  }
310
- if (where.condition === "LIKE" || where.condition === "NOT LIKE") {
312
+ if (where.condition === Enums_1.ConditionTypes.LIKE ||
313
+ where.condition === Enums_1.ConditionTypes["NOT LIKE"]) {
311
314
  where.value = where.value.replace(/\*/g, "%");
312
315
  }
313
316
  // This means that the condition is related with another table
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axe-api",
3
- "version": "0.20.0-rc21",
3
+ "version": "0.20.0-rc22",
4
4
  "description": "AXE API is a simple tool which has been created based on Express and Knex.js to create Rest APIs quickly.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",