@mikro-orm/sql 7.0.0-dev.216 → 7.0.0-dev.217
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/AbstractSqlDriver.d.ts +9 -9
- package/AbstractSqlDriver.js +61 -57
- package/AbstractSqlPlatform.d.ts +3 -3
- package/SqlEntityManager.d.ts +1 -1
- package/dialects/postgresql/BasePostgreSqlPlatform.d.ts +2 -2
- package/package.json +2 -2
- package/query/CriteriaNode.d.ts +1 -0
- package/query/CriteriaNode.js +2 -0
- package/query/CriteriaNodeFactory.d.ts +5 -5
- package/query/CriteriaNodeFactory.js +17 -17
- package/query/NativeQueryBuilder.d.ts +3 -2
- package/query/ObjectCriteriaNode.js +5 -0
- package/query/QueryBuilder.d.ts +477 -64
- package/query/QueryBuilder.js +225 -29
- package/query/QueryBuilderHelper.d.ts +7 -7
- package/query/QueryBuilderHelper.js +3 -10
- package/query/raw.d.ts +11 -3
- package/query/raw.js +1 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/typings.d.ts +17 -19
package/typings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Generated, Kysely } from 'kysely';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CheckCallback, DeferMode, Dictionary, EntityName, EntityProperty, EntitySchemaWithMeta, FilterQuery, GroupOperator, Opt, Primary, PrimaryProperty, QueryFlag, QueryOrderMap, RawQueryFragment, Type } from '@mikro-orm/core';
|
|
3
3
|
import type { JoinType, QueryType } from './query/enums.js';
|
|
4
4
|
import type { DatabaseSchema } from './schema/DatabaseSchema.js';
|
|
5
5
|
import type { DatabaseTable } from './schema/DatabaseTable.js';
|
|
@@ -11,8 +11,8 @@ export interface Table {
|
|
|
11
11
|
schema_name?: string;
|
|
12
12
|
table_comment?: string;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
export type
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type InternalField<T> = string | RawQueryFragment | QueryBuilder | NativeQueryBuilder;
|
|
16
16
|
export interface JoinOptions {
|
|
17
17
|
table: string;
|
|
18
18
|
schema?: string;
|
|
@@ -147,33 +147,31 @@ export interface SchemaDifference {
|
|
|
147
147
|
export interface IQueryBuilder<T> {
|
|
148
148
|
readonly alias: string;
|
|
149
149
|
readonly type: QueryType;
|
|
150
|
-
|
|
150
|
+
/** @internal */
|
|
151
|
+
_fields?: InternalField<T>[];
|
|
151
152
|
/** @internal */
|
|
152
153
|
helper: any;
|
|
153
|
-
select(fields:
|
|
154
|
+
select(fields: string | RawQueryFragment | (string | RawQueryFragment)[], distinct?: boolean): this;
|
|
154
155
|
addSelect(fields: string | string[]): this;
|
|
155
156
|
from<T extends object>(target: EntityName<T> | IQueryBuilder<T>, aliasName?: string): IQueryBuilder<T>;
|
|
156
157
|
insert(data: any): this;
|
|
157
158
|
update(data: any): this;
|
|
158
|
-
delete(cond?:
|
|
159
|
+
delete(cond?: FilterQuery<any>): this;
|
|
159
160
|
truncate(): this;
|
|
160
161
|
count(field?: string | string[], distinct?: boolean): this;
|
|
161
|
-
join(field: string, alias: string, cond?:
|
|
162
|
-
innerJoin(field: string, alias: string, cond?:
|
|
163
|
-
leftJoin(field: string, alias: string, cond?:
|
|
164
|
-
joinAndSelect(field:
|
|
165
|
-
leftJoinAndSelect(field:
|
|
166
|
-
innerJoinAndSelect(field:
|
|
162
|
+
join(field: string, alias: string, cond?: FilterQuery<any>, type?: JoinType, path?: string): this;
|
|
163
|
+
innerJoin(field: string, alias: string, cond?: FilterQuery<any>): this;
|
|
164
|
+
leftJoin(field: string, alias: string, cond?: FilterQuery<any>): this;
|
|
165
|
+
joinAndSelect(field: any, alias: string, cond?: FilterQuery<any>): this;
|
|
166
|
+
leftJoinAndSelect(field: any, alias: string, cond?: FilterQuery<any>, fields?: string[]): this;
|
|
167
|
+
innerJoinAndSelect(field: any, alias: string, cond?: FilterQuery<any>, fields?: string[]): this;
|
|
167
168
|
withSubQuery(subQuery: RawQueryFragment | NativeQueryBuilder, alias: string): this;
|
|
168
|
-
where(cond:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
andWhere(cond: string, params?: any[]): this;
|
|
172
|
-
orWhere(cond: QBFilterQuery<T>): this;
|
|
173
|
-
orWhere(cond: string, params?: any[]): this;
|
|
169
|
+
where(cond: FilterQuery<T> | string | RawQueryFragment | Dictionary, operator?: keyof typeof GroupOperator | any[], operator2?: keyof typeof GroupOperator): this;
|
|
170
|
+
andWhere(cond: FilterQuery<T> | string | RawQueryFragment | Dictionary, params?: any[]): this;
|
|
171
|
+
orWhere(cond: FilterQuery<T> | string | RawQueryFragment | Dictionary, params?: any[]): this;
|
|
174
172
|
orderBy(orderBy: QueryOrderMap<T>): this;
|
|
175
173
|
groupBy(fields: (string | keyof T) | (string | keyof T)[]): this;
|
|
176
|
-
having(cond?:
|
|
174
|
+
having(cond?: FilterQuery<any> | string, params?: any[]): this;
|
|
177
175
|
getAliasForJoinPath(path: string, options?: ICriteriaNodeProcessOptions): string | undefined;
|
|
178
176
|
getJoinForPath(path?: string, options?: ICriteriaNodeProcessOptions): JoinOptions | undefined;
|
|
179
177
|
getNextAlias(entityName?: string | EntityName<T>): string;
|