tspace-mysql 1.2.7 → 1.2.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.
@@ -2123,7 +2123,7 @@ class Model extends AbstractModel_1.AbstractModel {
2123
2123
  objects = Object.assign(Object.assign({}, objects), { [updatedAt]: this.$utils.timestamp() });
2124
2124
  }
2125
2125
  const keyValue = Object.entries(objects).map(([column, value]) => {
2126
- if (typeof value === 'string')
2126
+ if (typeof value === 'string' && !(value.includes(this.$constants('RAW'))))
2127
2127
  value = value === null || value === void 0 ? void 0 : value.replace(/'/g, '');
2128
2128
  return `${column} = ${value == null || value === 'NULL'
2129
2129
  ? 'NULL'
@@ -2148,7 +2148,7 @@ class Model extends AbstractModel_1.AbstractModel {
2148
2148
  }
2149
2149
  const columns = Object.keys(objects).map((column) => `\`${column}\``);
2150
2150
  const values = Object.values(objects).map((value) => {
2151
- if (typeof value === 'string')
2151
+ if (typeof value === 'string' && !(value.includes(this.$constants('RAW'))))
2152
2152
  value = value === null || value === void 0 ? void 0 : value.replace(/'/g, '');
2153
2153
  return `${value == null || value === 'NULL'
2154
2154
  ? 'NULL'
@@ -2189,7 +2189,7 @@ class Model extends AbstractModel_1.AbstractModel {
2189
2189
  ];
2190
2190
  }
2191
2191
  const v = Object.values(objects).map((value) => {
2192
- if (typeof value === 'string')
2192
+ if (typeof value === 'string' && !(value.includes(this.$constants('RAW'))))
2193
2193
  value = value === null || value === void 0 ? void 0 : value.replace(/'/g, '');
2194
2194
  return `${value == null || value === 'NULL'
2195
2195
  ? 'NULL'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tspace-mysql",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "mysql query builder object relational mapping",
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.ts",