@mikro-orm/knex 6.0.0-dev.261 → 6.0.0-dev.262
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/AbstractSqlPlatform.d.ts
CHANGED
|
@@ -19,4 +19,8 @@ export declare abstract class AbstractSqlPlatform extends Platform {
|
|
|
19
19
|
supportsSchemas(): boolean;
|
|
20
20
|
/** @inheritDoc */
|
|
21
21
|
generateCustomOrder(escapedColumn: string, values: unknown[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
getOrderByExpression(column: string, direction: string): string[];
|
|
22
26
|
}
|
package/AbstractSqlPlatform.js
CHANGED
|
@@ -112,5 +112,11 @@ class AbstractSqlPlatform extends core_1.Platform {
|
|
|
112
112
|
});
|
|
113
113
|
return ret + 'else null end)';
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
getOrderByExpression(column, direction) {
|
|
119
|
+
return [`${column} ${direction.toLowerCase()}`];
|
|
120
|
+
}
|
|
115
121
|
}
|
|
116
122
|
exports.AbstractSqlPlatform = AbstractSqlPlatform;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.262",
|
|
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",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^5.9.2"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.0.0-dev.
|
|
69
|
+
"@mikro-orm/core": "6.0.0-dev.262"
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -496,7 +496,7 @@ class QueryBuilderHelper {
|
|
|
496
496
|
order.forEach(part => ret.push(...this.getQueryOrderFromObject(type, part, populate)));
|
|
497
497
|
}
|
|
498
498
|
else {
|
|
499
|
-
ret.push(
|
|
499
|
+
ret.push(...this.platform.getOrderByExpression(colPart, order));
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
}
|