@mikro-orm/mssql 6.6.10-dev.0 → 6.6.10-dev.1
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.
- package/MsSqlSchemaHelper.js +2 -2
- package/package.json +3 -3
package/MsSqlSchemaHelper.js
CHANGED
|
@@ -194,7 +194,7 @@ class MsSqlSchemaHelper extends knex_1.SchemaHelper {
|
|
|
194
194
|
/* istanbul ignore next */
|
|
195
195
|
const hasItems = (items?.length ?? 0) > 0;
|
|
196
196
|
if (item.columnName && hasItems) {
|
|
197
|
-
items = items.map(val => val.trim().replace(`[${item.columnName}]=`, '').match(/^\(?'(
|
|
197
|
+
items = items.map(val => val.trim().replace(`[${item.columnName}]=`, '').match(/^\(?'((?:[^']|'')*)'/)?.[1]?.replace(/''/g, "'")).filter(Boolean);
|
|
198
198
|
if (items.length > 0) {
|
|
199
199
|
o[item.columnName] = items.reverse();
|
|
200
200
|
found.push(index);
|
|
@@ -339,7 +339,7 @@ class MsSqlSchemaHelper extends knex_1.SchemaHelper {
|
|
|
339
339
|
if (changedProperties && column.mappedType instanceof knex_1.EnumType && column.enumItems?.every(item => knex_1.Utils.isString(item))) {
|
|
340
340
|
const checkName = this.platform.getConfig().getNamingStrategy().indexName(fromTable.name, [column.name], 'check');
|
|
341
341
|
if (changedProperties.has('enumItems')) {
|
|
342
|
-
table.check(`${this.platform.quoteIdentifier(column.name)} in (
|
|
342
|
+
table.check(`${this.platform.quoteIdentifier(column.name)} in (${column.enumItems.map(v => this.platform.quoteValue(v)).join(', ')})`, {}, this.platform.quoteIdentifier(checkName));
|
|
343
343
|
}
|
|
344
344
|
/* istanbul ignore next */
|
|
345
345
|
if (changedProperties.has('type')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
|
-
"version": "6.6.10-dev.
|
|
3
|
+
"version": "6.6.10-dev.1",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/knex": "6.6.10-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.6.10-dev.1",
|
|
62
62
|
"tedious": "19.2.1",
|
|
63
63
|
"tsqlstring": "1.0.1"
|
|
64
64
|
},
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.6.9"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.6.10-dev.
|
|
69
|
+
"@mikro-orm/core": "6.6.10-dev.1"
|
|
70
70
|
}
|
|
71
71
|
}
|