typeorm-extensions 2.2.0-rc.4 → 2.2.0-rc.5

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.
@@ -13,8 +13,11 @@ function getValuePlaceholder(value, paramName) {
13
13
  return `:${paramName}`;
14
14
  }
15
15
  exports.getValuePlaceholder = getValuePlaceholder;
16
- /** A condition that ends with an operator, `=`, `>=`, `LIKE`, `IN`, `@>`: it needs a value after it. */
17
- const OPERATOR_AT_END = /(?:[=<>!~@&|?]|\b(?:LIKE|ILIKE|IN|SIMILAR TO|DISTINCT FROM|BETWEEN|ANY|ALL))\s*$/i;
16
+ /**
17
+ * A condition that ends with an operator, `=`, `>=`, `LIKE`, `IN`, `@>`: it needs a value after it. A word after
18
+ * `:` or `.` is a parameter or a column (`ILIKE :like`, `= t.in`), not an operator.
19
+ */
20
+ const OPERATOR_AT_END = /(?:[=<>!~@&|?]|(?<![\w$:.])(?:LIKE|ILIKE|IN|SIMILAR TO|DISTINCT FROM|BETWEEN|ANY|ALL))\s*$/i;
18
21
  const isDate = (value) => Object.prototype.toString.call(value) === '[object Date]';
19
22
  /**
20
23
  * Objects that are parameter values themselves, not `{ name: value }` params objects:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typeorm-extensions",
3
- "version": "2.2.0-rc.4",
3
+ "version": "2.2.0-rc.5",
4
4
  "description": "typeorm commonly used extensions",
5
5
  "main": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",