@technicity/data-service-generator 0.5.6 → 0.5.7

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.
@@ -679,6 +679,11 @@ async function getJSONSchemaWhere(table) {
679
679
  properties: { $like: { type: "string", minLength: 1 } },
680
680
  additionalProperties: false,
681
681
  },
682
+ {
683
+ type: "object",
684
+ properties: { $nlike: { type: "string", minLength: 1 } },
685
+ additionalProperties: false,
686
+ },
682
687
  {
683
688
  type: "object",
684
689
  properties: { $in: { type: "array", items: v } },
@@ -708,6 +708,7 @@ const ops = [
708
708
  "$in",
709
709
  "$nin",
710
710
  "$like",
711
+ "$nlike",
711
712
  "$btwn",
712
713
  "$nbtwn",
713
714
  ];
@@ -111,6 +111,9 @@ function _stringifyWhere(where, table, escapeId, escape, result) {
111
111
  if (operator === "$like") {
112
112
  return `${table}.${escapeId(k)} LIKE ${printValue(operand)}`;
113
113
  }
114
+ if (operator === "$nlike") {
115
+ return `${table}.${escapeId(k)} NOT LIKE ${printValue(operand)}`;
116
+ }
114
117
  if (operator === "$in") {
115
118
  if (operand.length === 0) {
116
119
  // Would do "FALSE" instead, as it's more readable, but it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technicity/data-service-generator",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist"