@mikro-orm/mssql 7.0.0-dev.76 → 7.0.0-dev.77
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/MsSqlConnection.js +1 -1
- package/MsSqlDriver.js +1 -1
- package/MsSqlExceptionConverter.js +1 -1
- package/MsSqlPlatform.js +4 -4
- package/MsSqlSchemaGenerator.js +1 -1
- package/MsSqlSchemaHelper.js +1 -1
- package/UnicodeStringType.js +1 -1
- package/package.json +3 -3
package/MsSqlConnection.js
CHANGED
package/MsSqlDriver.js
CHANGED
|
@@ -54,7 +54,7 @@ export class MsSqlDriver extends AbstractSqlDriver {
|
|
|
54
54
|
.filter(prop => prop.persist !== false && prop.defaultRaw || prop.autoincrement || prop.generated)
|
|
55
55
|
.filter(prop => !(prop.name in data[0]) || isRaw(data[0][prop.name]));
|
|
56
56
|
const returningFields = Utils.flatten(returningProps.map(prop => prop.fieldNames));
|
|
57
|
-
/* v8 ignore next
|
|
57
|
+
/* v8 ignore next */
|
|
58
58
|
if (returningFields.length === 0) {
|
|
59
59
|
return sql;
|
|
60
60
|
}
|
|
@@ -6,7 +6,7 @@ export class MsSqlExceptionConverter extends ExceptionConverter {
|
|
|
6
6
|
*/
|
|
7
7
|
convertException(exception) {
|
|
8
8
|
let errno = exception.number;
|
|
9
|
-
/* v8 ignore next
|
|
9
|
+
/* v8 ignore next */
|
|
10
10
|
if ('errors' in exception && Array.isArray(exception.errors) && typeof exception.errors[0] === 'object' && 'message' in exception.errors[0]) {
|
|
11
11
|
exception.message += '\n' + exception.errors.map(e => e.message).join('\n');
|
|
12
12
|
errno ??= exception.errors[0].number;
|
package/MsSqlPlatform.js
CHANGED
|
@@ -33,7 +33,7 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
35
|
convertDateToJSValue(value) {
|
|
36
|
-
/* v8 ignore next
|
|
36
|
+
/* v8 ignore next */
|
|
37
37
|
if (typeof value === 'string') {
|
|
38
38
|
return value;
|
|
39
39
|
}
|
|
@@ -149,14 +149,14 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
149
149
|
};
|
|
150
150
|
const cast = (key) => raw(type in types ? `cast(${key} as ${types[type]})` : key);
|
|
151
151
|
const quoteKey = (key) => key.match(/^[a-z]\w*$/i) ? key : `"${key}"`;
|
|
152
|
-
/* v8 ignore next
|
|
152
|
+
/* v8 ignore next */
|
|
153
153
|
if (path.length === 0) {
|
|
154
154
|
return cast(`json_value(${root}, '$.${b.map(quoteKey).join('.')}')`);
|
|
155
155
|
}
|
|
156
156
|
return cast(`json_value(${root}, '$.${b.map(quoteKey).join('.')}')`);
|
|
157
157
|
}
|
|
158
158
|
normalizePrimaryKey(data) {
|
|
159
|
-
/* v8 ignore next
|
|
159
|
+
/* v8 ignore next */
|
|
160
160
|
if (data instanceof UnicodeString) {
|
|
161
161
|
return data.value;
|
|
162
162
|
}
|
|
@@ -189,7 +189,7 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
189
189
|
}
|
|
190
190
|
return SqlString.escape(value);
|
|
191
191
|
}
|
|
192
|
-
/* v8 ignore next
|
|
192
|
+
/* v8 ignore next: kept for type inference only */
|
|
193
193
|
getSchemaGenerator(driver, em) {
|
|
194
194
|
return new MsSqlSchemaGenerator(em ?? driver);
|
|
195
195
|
}
|
package/MsSqlSchemaGenerator.js
CHANGED
|
@@ -5,7 +5,7 @@ export class MsSqlSchemaGenerator extends SchemaGenerator {
|
|
|
5
5
|
}
|
|
6
6
|
async clear(options) {
|
|
7
7
|
// truncate by default, so no value is considered as true
|
|
8
|
-
/* v8 ignore next
|
|
8
|
+
/* v8 ignore next */
|
|
9
9
|
if (options?.truncate === false) {
|
|
10
10
|
return super.clear(options);
|
|
11
11
|
}
|
package/MsSqlSchemaHelper.js
CHANGED
|
@@ -382,7 +382,7 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
382
382
|
return parts;
|
|
383
383
|
}
|
|
384
384
|
getCreateIndexSQL(tableName, index, partialExpression = false) {
|
|
385
|
-
/* v8 ignore next
|
|
385
|
+
/* v8 ignore next */
|
|
386
386
|
if (index.expression && !partialExpression) {
|
|
387
387
|
return index.expression;
|
|
388
388
|
}
|
package/UnicodeStringType.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.77",
|
|
5
5
|
"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.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/knex": "7.0.0-dev.
|
|
53
|
+
"@mikro-orm/knex": "7.0.0-dev.77",
|
|
54
54
|
"tarn": "3.0.2",
|
|
55
55
|
"tedious": "19.1.0",
|
|
56
56
|
"tsqlstring": "1.0.1"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"kysely": "0.28.8"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
63
|
+
"@mikro-orm/core": "7.0.0-dev.77",
|
|
64
64
|
"kysely": "*"
|
|
65
65
|
}
|
|
66
66
|
}
|