@mikro-orm/mssql 7.1.7 → 7.2.0-dev.0
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 -7
- package/package.json +4 -4
package/MsSqlPlatform.js
CHANGED
|
@@ -223,19 +223,18 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
223
223
|
return collation;
|
|
224
224
|
}
|
|
225
225
|
getOrderByExpression(column, direction, collation) {
|
|
226
|
-
const dir = this.validateOrderByDirection(direction);
|
|
227
226
|
const col = collation ? `${column} collate ${this.quoteCollation(collation)}` : column;
|
|
228
|
-
switch (
|
|
229
|
-
case QueryOrder.
|
|
227
|
+
switch (direction.toUpperCase()) {
|
|
228
|
+
case QueryOrder.ASC_NULLS_FIRST:
|
|
230
229
|
return [`case when ${column} is null then 0 else 1 end, ${col} asc`];
|
|
231
|
-
case QueryOrder.
|
|
230
|
+
case QueryOrder.ASC_NULLS_LAST:
|
|
232
231
|
return [`case when ${column} is null then 1 else 0 end, ${col} asc`];
|
|
233
|
-
case QueryOrder.
|
|
232
|
+
case QueryOrder.DESC_NULLS_FIRST:
|
|
234
233
|
return [`case when ${column} is null then 0 else 1 end, ${col} desc`];
|
|
235
|
-
case QueryOrder.
|
|
234
|
+
case QueryOrder.DESC_NULLS_LAST:
|
|
236
235
|
return [`case when ${column} is null then 1 else 0 end, ${col} desc`];
|
|
237
236
|
default:
|
|
238
|
-
return [`${col} ${
|
|
237
|
+
return [`${col} ${direction.toLowerCase()}`];
|
|
239
238
|
}
|
|
240
239
|
}
|
|
241
240
|
getDefaultClientUrl() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0-dev.0",
|
|
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
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"copy": "node ../../scripts/copy.mjs"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@mikro-orm/sql": "7.
|
|
50
|
+
"@mikro-orm/sql": "7.2.0-dev.0",
|
|
51
51
|
"kysely": "0.29.3",
|
|
52
52
|
"tarn": "3.1.2",
|
|
53
53
|
"tedious": "20.0.0",
|
|
54
54
|
"tsqlstring": "1.0.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@mikro-orm/core": "^7.1.
|
|
57
|
+
"@mikro-orm/core": "^7.1.6"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@mikro-orm/core": "7.
|
|
60
|
+
"@mikro-orm/core": "7.2.0-dev.0"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">= 22.17.0"
|