@mikro-orm/mssql 6.6.14-dev.1 → 6.6.14-dev.2
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/MsSqlPlatform.js +6 -3
- package/package.json +3 -3
package/MsSqlPlatform.js
CHANGED
|
@@ -150,12 +150,15 @@ class MsSqlPlatform extends knex_1.AbstractSqlPlatform {
|
|
|
150
150
|
boolean: 'bit',
|
|
151
151
|
};
|
|
152
152
|
const cast = (key) => (0, knex_1.raw)(type in types ? `cast(${key} as ${types[type]})` : key);
|
|
153
|
-
const quoteKey = (key) => key.match(/^[a-z]\w*$/i)
|
|
153
|
+
const quoteKey = (key) => key.match(/^[a-z]\w*$/i)
|
|
154
|
+
? key
|
|
155
|
+
: `"${key.replaceAll('\\', '\\\\').replaceAll('"', '\\"')}"`;
|
|
156
|
+
const jsonPath = this.quoteValue(`$.${b.map(quoteKey).join('.')}`);
|
|
154
157
|
/* istanbul ignore if */
|
|
155
158
|
if (path.length === 0) {
|
|
156
|
-
return cast(`json_value(${root},
|
|
159
|
+
return cast(`json_value(${root}, ${jsonPath})`);
|
|
157
160
|
}
|
|
158
|
-
return cast(`json_value(${root},
|
|
161
|
+
return cast(`json_value(${root}, ${jsonPath})`);
|
|
159
162
|
}
|
|
160
163
|
normalizePrimaryKey(data) {
|
|
161
164
|
/* istanbul ignore if */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
|
-
"version": "6.6.14-dev.
|
|
3
|
+
"version": "6.6.14-dev.2",
|
|
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.14-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.6.14-dev.2",
|
|
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.13"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.6.14-dev.
|
|
69
|
+
"@mikro-orm/core": "6.6.14-dev.2"
|
|
70
70
|
}
|
|
71
71
|
}
|