@mikro-orm/sql 7.1.12-dev.10 → 7.1.12-dev.11
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/SqlEntityManager.js +1 -2
- package/package.json +2 -2
- package/query/QueryBuilder.d.ts +3 -4
package/SqlEntityManager.js
CHANGED
|
@@ -75,8 +75,7 @@ export class SqlEntityManager extends EntityManager {
|
|
|
75
75
|
*/
|
|
76
76
|
async countBy(entityName, groupBy, options = {}) {
|
|
77
77
|
const em = this.getContext(false);
|
|
78
|
-
options =
|
|
79
|
-
em.prepareOptions(options);
|
|
78
|
+
options = em.prepareOptions(options);
|
|
80
79
|
const meta = em.getMetadata().find(entityName);
|
|
81
80
|
const fields = Utils.asArray(groupBy);
|
|
82
81
|
const { where: rawWhere, ...countOptions } = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/sql",
|
|
3
|
-
"version": "7.1.12-dev.
|
|
3
|
+
"version": "7.1.12-dev.11",
|
|
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",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@mikro-orm/core": "^7.1.11"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@mikro-orm/core": "7.1.12-dev.
|
|
56
|
+
"@mikro-orm/core": "7.1.12-dev.11"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 22.17.0"
|
package/query/QueryBuilder.d.ts
CHANGED
|
@@ -152,11 +152,10 @@ type ContextFilterKeys<Context> = {
|
|
|
152
152
|
type RawFilterKeys<RawAliases extends string> = {
|
|
153
153
|
[K in RawAliases]?: AliasedFilterValue;
|
|
154
154
|
};
|
|
155
|
-
type NestedFilterCondition<Entity, RootAlias extends string, Context, RawAliases extends string> = ObjectQuery<Entity> & (IsNever<RootAlias> extends true ? {} : string extends RootAlias ? {} : RootAliasFilterKeys<RootAlias, Entity>) & ([Context] extends [never] ? {} : ContextFilterKeys<Context>) & (IsNever<RawAliases> extends true ? {} : string extends RawAliases ? {} : RawFilterKeys<RawAliases>);
|
|
156
155
|
type GroupOperators<RootAlias extends string, Context, Entity, RawAliases extends string> = {
|
|
157
|
-
$and?:
|
|
158
|
-
$or?:
|
|
159
|
-
$not?:
|
|
156
|
+
$and?: QBFilterQuery<Entity, RootAlias, Context, RawAliases>[];
|
|
157
|
+
$or?: QBFilterQuery<Entity, RootAlias, Context, RawAliases>[];
|
|
158
|
+
$not?: QBFilterQuery<Entity, RootAlias, Context, RawAliases>;
|
|
160
159
|
};
|
|
161
160
|
export type AliasedFilterCondition<RootAlias extends string, Context, Entity, RawAliases extends string = never> = (IsNever<RootAlias> extends true ? {} : string extends RootAlias ? {} : RootAliasFilterKeys<RootAlias, Entity>) & ([Context] extends [never] ? {} : ContextFilterKeys<Context>) & (IsNever<RawAliases> extends true ? {} : string extends RawAliases ? {} : RawFilterKeys<RawAliases>) & GroupOperators<RootAlias, Context, Entity, RawAliases>;
|
|
162
161
|
export type QBFilterQuery<Entity, RootAlias extends string = never, Context = never, RawAliases extends string = never> = FilterObject<Entity> & AliasedFilterCondition<RootAlias, Context, Entity, RawAliases>;
|