@mikro-orm/sql 7.0.0-dev.99 → 7.0.0-rc.1
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/AbstractSqlConnection.d.ts +2 -4
- package/AbstractSqlConnection.js +3 -7
- package/AbstractSqlDriver.d.ts +89 -23
- package/AbstractSqlDriver.js +630 -197
- package/AbstractSqlPlatform.d.ts +11 -5
- package/AbstractSqlPlatform.js +18 -5
- package/PivotCollectionPersister.d.ts +5 -0
- package/PivotCollectionPersister.js +30 -12
- package/SqlEntityManager.d.ts +2 -2
- package/dialects/mysql/{MySqlPlatform.d.ts → BaseMySqlPlatform.d.ts} +4 -3
- package/dialects/mysql/{MySqlPlatform.js → BaseMySqlPlatform.js} +9 -4
- package/dialects/mysql/MySqlSchemaHelper.d.ts +12 -1
- package/dialects/mysql/MySqlSchemaHelper.js +97 -6
- package/dialects/mysql/index.d.ts +1 -2
- package/dialects/mysql/index.js +1 -2
- package/dialects/postgresql/BasePostgreSqlPlatform.d.ts +106 -0
- package/dialects/postgresql/BasePostgreSqlPlatform.js +350 -0
- package/dialects/postgresql/FullTextType.d.ts +14 -0
- package/dialects/postgresql/FullTextType.js +59 -0
- package/dialects/postgresql/PostgreSqlExceptionConverter.d.ts +8 -0
- package/dialects/postgresql/PostgreSqlExceptionConverter.js +47 -0
- package/dialects/postgresql/PostgreSqlSchemaHelper.d.ts +90 -0
- package/dialects/postgresql/PostgreSqlSchemaHelper.js +732 -0
- package/dialects/postgresql/index.d.ts +3 -0
- package/dialects/postgresql/index.js +3 -0
- package/dialects/sqlite/BaseSqliteConnection.d.ts +1 -0
- package/dialects/sqlite/BaseSqliteConnection.js +13 -0
- package/dialects/sqlite/BaseSqlitePlatform.d.ts +6 -0
- package/dialects/sqlite/BaseSqlitePlatform.js +12 -0
- package/dialects/sqlite/SqliteSchemaHelper.d.ts +25 -0
- package/dialects/sqlite/SqliteSchemaHelper.js +145 -19
- package/dialects/sqlite/index.d.ts +0 -1
- package/dialects/sqlite/index.js +0 -1
- package/package.json +5 -6
- package/plugin/transformer.d.ts +1 -1
- package/plugin/transformer.js +1 -1
- package/query/CriteriaNode.d.ts +9 -5
- package/query/CriteriaNode.js +16 -15
- package/query/CriteriaNodeFactory.d.ts +6 -6
- package/query/CriteriaNodeFactory.js +33 -31
- package/query/NativeQueryBuilder.d.ts +3 -2
- package/query/NativeQueryBuilder.js +1 -2
- package/query/ObjectCriteriaNode.js +51 -36
- package/query/QueryBuilder.d.ts +569 -79
- package/query/QueryBuilder.js +614 -171
- package/query/QueryBuilderHelper.d.ts +24 -16
- package/query/QueryBuilderHelper.js +167 -78
- package/query/ScalarCriteriaNode.js +2 -2
- package/query/raw.d.ts +11 -3
- package/query/raw.js +1 -2
- package/schema/DatabaseSchema.d.ts +15 -2
- package/schema/DatabaseSchema.js +143 -15
- package/schema/DatabaseTable.d.ts +12 -0
- package/schema/DatabaseTable.js +91 -31
- package/schema/SchemaComparator.d.ts +8 -0
- package/schema/SchemaComparator.js +127 -3
- package/schema/SchemaHelper.d.ts +26 -3
- package/schema/SchemaHelper.js +98 -11
- package/schema/SqlSchemaGenerator.d.ts +10 -0
- package/schema/SqlSchemaGenerator.js +137 -9
- package/tsconfig.build.tsbuildinfo +1 -0
- package/typings.d.ts +78 -38
- package/dialects/postgresql/PostgreSqlTableCompiler.d.ts +0 -1
- package/dialects/postgresql/PostgreSqlTableCompiler.js +0 -1
|
@@ -48,10 +48,8 @@ export declare abstract class AbstractSqlConnection extends Connection {
|
|
|
48
48
|
private prepareQuery;
|
|
49
49
|
execute<T extends QueryResult | EntityData<AnyEntity> | EntityData<AnyEntity>[] = EntityData<AnyEntity>[]>(query: string | NativeQueryBuilder | RawQueryFragment, params?: readonly unknown[], method?: 'all' | 'get' | 'run', ctx?: Transaction, loggerContext?: LoggingOptions): Promise<T>;
|
|
50
50
|
stream<T extends EntityData<AnyEntity>>(query: string | NativeQueryBuilder | RawQueryFragment, params?: readonly unknown[], ctx?: Transaction<Kysely<any>>, loggerContext?: LoggingOptions): AsyncIterableIterator<T>;
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
*/
|
|
54
|
-
loadFile(path: string): Promise<void>;
|
|
51
|
+
/** @inheritDoc */
|
|
52
|
+
executeDump(dump: string): Promise<void>;
|
|
55
53
|
private getSql;
|
|
56
54
|
protected transformRawResult<T>(res: any, method?: 'all' | 'get' | 'run'): T;
|
|
57
55
|
}
|
package/AbstractSqlConnection.js
CHANGED
|
@@ -196,15 +196,11 @@ export class AbstractSqlConnection extends Connection {
|
|
|
196
196
|
throw e;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
/**
|
|
200
|
-
|
|
201
|
-
*/
|
|
202
|
-
async loadFile(path) {
|
|
199
|
+
/** @inheritDoc */
|
|
200
|
+
async executeDump(dump) {
|
|
203
201
|
await this.ensureConnection();
|
|
204
|
-
const { readFile } = globalThis.process.getBuiltinModule('node:fs/promises');
|
|
205
|
-
const buf = await readFile(path);
|
|
206
202
|
try {
|
|
207
|
-
const raw = CompiledQuery.raw(
|
|
203
|
+
const raw = CompiledQuery.raw(dump);
|
|
208
204
|
await this.getClient().executeQuery(raw);
|
|
209
205
|
}
|
|
210
206
|
catch (e) {
|
package/AbstractSqlDriver.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type AnyEntity, type Collection, type Configuration, type ConnectionType, type Constructor, type CountOptions, DatabaseDriver, type DeleteOptions, type Dictionary, type DriverMethodOptions, type EntityData, type EntityDictionary, type EntityField, EntityManagerType, type EntityMetadata, type EntityName, type EntityProperty, type FilterQuery, type FindOneOptions, type FindOptions, type LockOptions, type LoggingOptions, type NativeInsertUpdateManyOptions, type NativeInsertUpdateOptions, type ObjectQuery, type Options, type OrderDefinition, type PopulateOptions, type PopulatePath, type Primary, type QueryOrderMap, type QueryResult, RawQueryFragment, type StreamOptions, type Transaction, type UpsertManyOptions, type UpsertOptions } from '@mikro-orm/core';
|
|
1
|
+
import { type AnyEntity, type Collection, type Configuration, type ConnectionType, type Constructor, type CountOptions, DatabaseDriver, type DeleteOptions, type Dictionary, type DriverMethodOptions, type EntityData, type EntityDictionary, type EntityField, EntityManagerType, type EntityMetadata, type EntityName, type EntityProperty, type FilterQuery, type FindOneOptions, type FindOptions, type FormulaTable, type LockOptions, type LoggingOptions, type NativeInsertUpdateManyOptions, type NativeInsertUpdateOptions, type ObjectQuery, type Options, type OrderDefinition, type PopulateOptions, type PopulatePath, type Primary, type QueryOrderMap, type QueryResult, type Raw, RawQueryFragment, type StreamOptions, type Transaction, type UpsertManyOptions, type UpsertOptions } from '@mikro-orm/core';
|
|
2
2
|
import type { AbstractSqlConnection } from './AbstractSqlConnection.js';
|
|
3
3
|
import type { AbstractSqlPlatform } from './AbstractSqlPlatform.js';
|
|
4
4
|
import { QueryBuilder } from './query/QueryBuilder.js';
|
|
5
5
|
import { type NativeQueryBuilder } from './query/NativeQueryBuilder.js';
|
|
6
6
|
import { QueryType } from './query/enums.js';
|
|
7
7
|
import { SqlEntityManager } from './SqlEntityManager.js';
|
|
8
|
-
import type {
|
|
8
|
+
import type { InternalField } from './typings.js';
|
|
9
9
|
export declare abstract class AbstractSqlDriver<Connection extends AbstractSqlConnection = AbstractSqlConnection, Platform extends AbstractSqlPlatform = AbstractSqlPlatform> extends DatabaseDriver<Connection> {
|
|
10
10
|
[EntityManagerType]: SqlEntityManager<this>;
|
|
11
11
|
protected readonly connection: Connection;
|
|
@@ -13,25 +13,48 @@ export declare abstract class AbstractSqlDriver<Connection extends AbstractSqlCo
|
|
|
13
13
|
protected readonly platform: Platform;
|
|
14
14
|
protected constructor(config: Configuration, platform: Platform, connection: Constructor<Connection>, connector: string[]);
|
|
15
15
|
getPlatform(): Platform;
|
|
16
|
+
/** Evaluates a formula callback, handling both string and Raw return values. */
|
|
17
|
+
evaluateFormula(formula: (...args: any[]) => string | Raw, columns: any, table: FormulaTable): string;
|
|
18
|
+
/** For TPT entities, returns ownProps (columns in this table); otherwise returns all props. */
|
|
19
|
+
private getTableProps;
|
|
20
|
+
/** Creates a FormulaTable object for use in formula callbacks. */
|
|
21
|
+
private createFormulaTable;
|
|
22
|
+
private validateSqlOptions;
|
|
16
23
|
createEntityManager(useContext?: boolean): this[typeof EntityManagerType];
|
|
17
24
|
private createQueryBuilderFromOptions;
|
|
18
|
-
find<T extends object, P extends string = never, F extends string = PopulatePath.ALL, E extends string = never>(entityName:
|
|
19
|
-
findOne<T extends object, P extends string = never, F extends string = PopulatePath.ALL, E extends string = never>(entityName:
|
|
25
|
+
find<T extends object, P extends string = never, F extends string = PopulatePath.ALL, E extends string = never>(entityName: EntityName<T>, where: ObjectQuery<T>, options?: FindOptions<T, P, F, E>): Promise<EntityData<T>[]>;
|
|
26
|
+
findOne<T extends object, P extends string = never, F extends string = PopulatePath.ALL, E extends string = never>(entityName: EntityName<T>, where: ObjectQuery<T>, options?: FindOneOptions<T, P, F, E>): Promise<EntityData<T> | null>;
|
|
20
27
|
protected hasToManyJoins<T extends object>(hint: PopulateOptions<T>, meta: EntityMetadata<T>): boolean;
|
|
21
|
-
findVirtual<T extends object>(entityName:
|
|
22
|
-
countVirtual<T extends object>(entityName:
|
|
23
|
-
protected findFromVirtual<T extends object>(entityName:
|
|
28
|
+
findVirtual<T extends object>(entityName: EntityName<T>, where: ObjectQuery<T>, options: FindOptions<T, any, any, any>): Promise<EntityData<T>[]>;
|
|
29
|
+
countVirtual<T extends object>(entityName: EntityName<T>, where: ObjectQuery<T>, options: CountOptions<T, any>): Promise<number>;
|
|
30
|
+
protected findFromVirtual<T extends object>(entityName: EntityName<T>, where: ObjectQuery<T>, options: FindOptions<T, any> | CountOptions<T, any>, type: QueryType): Promise<EntityData<T>[] | number>;
|
|
24
31
|
protected streamFromVirtual<T extends object>(entityName: EntityName<T>, where: FilterQuery<T>, options: StreamOptions<T, any>): AsyncIterableIterator<EntityData<T>>;
|
|
25
32
|
protected wrapVirtualExpressionInSubquery<T extends object>(meta: EntityMetadata<T>, expression: string, where: FilterQuery<T>, options: FindOptions<T, any>, type: QueryType): Promise<T[] | number>;
|
|
26
33
|
protected wrapVirtualExpressionInSubqueryStream<T extends object>(meta: EntityMetadata<T>, expression: string, where: FilterQuery<T>, options: FindOptions<T, any, any, any>, type: QueryType.SELECT): AsyncIterableIterator<T>;
|
|
34
|
+
/**
|
|
35
|
+
* Virtual entities have no PKs, so to-many populate joins can't be deduplicated.
|
|
36
|
+
* Force balanced strategy to load to-many relations via separate queries.
|
|
37
|
+
*/
|
|
38
|
+
private forceBalancedStrategy;
|
|
27
39
|
mapResult<T extends object>(result: EntityData<T>, meta: EntityMetadata<T>, populate?: PopulateOptions<T>[], qb?: QueryBuilder<T, any, any, any>, map?: Dictionary): EntityData<T> | null;
|
|
40
|
+
/**
|
|
41
|
+
* Maps aliased columns from TPT parent tables back to their original field names.
|
|
42
|
+
* TPT parent columns are selected with aliases like `parent_alias__column_name`,
|
|
43
|
+
* and need to be renamed back to `column_name` for the result mapper to work.
|
|
44
|
+
*/
|
|
45
|
+
private mapTPTColumns;
|
|
28
46
|
private mapJoinedProps;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Maps a single property from a joined result row into the relation pojo.
|
|
49
|
+
* Handles polymorphic FKs, composite keys, Date parsing, and embedded objects.
|
|
50
|
+
*/
|
|
51
|
+
private mapJoinedProp;
|
|
52
|
+
count<T extends object>(entityName: EntityName<T>, where: any, options?: CountOptions<T>): Promise<number>;
|
|
53
|
+
nativeInsert<T extends object>(entityName: EntityName<T>, data: EntityDictionary<T>, options?: NativeInsertUpdateOptions<T>): Promise<QueryResult<T>>;
|
|
54
|
+
nativeInsertMany<T extends object>(entityName: EntityName<T>, data: EntityDictionary<T>[], options?: NativeInsertUpdateManyOptions<T>, transform?: (sql: string) => string): Promise<QueryResult<T>>;
|
|
55
|
+
nativeUpdate<T extends object>(entityName: EntityName<T>, where: FilterQuery<T>, data: EntityDictionary<T>, options?: NativeInsertUpdateOptions<T> & UpsertOptions<T>): Promise<QueryResult<T>>;
|
|
56
|
+
nativeUpdateMany<T extends object>(entityName: EntityName<T>, where: FilterQuery<T>[], data: EntityDictionary<T>[], options?: NativeInsertUpdateManyOptions<T> & UpsertManyOptions<T>): Promise<QueryResult<T>>;
|
|
57
|
+
nativeDelete<T extends object>(entityName: EntityName<T>, where: FilterQuery<T> | string | any, options?: DeleteOptions<T>): Promise<QueryResult<T>>;
|
|
35
58
|
/**
|
|
36
59
|
* Fast comparison for collection snapshots that are represented by PK arrays.
|
|
37
60
|
* Compares scalars via `===` and fallbacks to Utils.equals()` for more complex types like Buffer.
|
|
@@ -40,6 +63,24 @@ export declare abstract class AbstractSqlDriver<Connection extends AbstractSqlCo
|
|
|
40
63
|
private comparePrimaryKeyArrays;
|
|
41
64
|
syncCollections<T extends object, O extends object>(collections: Iterable<Collection<T, O>>, options?: DriverMethodOptions): Promise<void>;
|
|
42
65
|
loadFromPivotTable<T extends object, O extends object>(prop: EntityProperty, owners: Primary<O>[][], where?: FilterQuery<any>, orderBy?: OrderDefinition<T>, ctx?: Transaction, options?: FindOptions<T, any, any, any>, pivotJoin?: boolean): Promise<Dictionary<T[]>>;
|
|
66
|
+
/**
|
|
67
|
+
* Load from a polymorphic M:N pivot table.
|
|
68
|
+
*/
|
|
69
|
+
protected loadFromPolymorphicPivotTable<T extends object, O extends object>(prop: EntityProperty, owners: Primary<O>[][], where?: FilterQuery<any>, orderBy?: OrderDefinition<T>, ctx?: Transaction, options?: FindOptions<T, any, any, any>, pivotJoin?: boolean): Promise<Dictionary<T[]>>;
|
|
70
|
+
/**
|
|
71
|
+
* Load from owner side of polymorphic M:N (e.g., Post -> Tags)
|
|
72
|
+
*/
|
|
73
|
+
protected loadPolymorphicPivotOwnerSide<T extends object, O extends object>(prop: EntityProperty, owners: Primary<O>[][], where: FilterQuery<any>, orderBy?: OrderDefinition<T>, ctx?: Transaction, options?: FindOptions<T, any, any, any>, pivotJoin?: boolean, inverseProp?: EntityProperty): Promise<Dictionary<T[]>>;
|
|
74
|
+
/**
|
|
75
|
+
* Load from inverse side of polymorphic M:N (e.g., Tag -> Posts)
|
|
76
|
+
* Uses single query with join via virtual relation on pivot.
|
|
77
|
+
*/
|
|
78
|
+
protected loadPolymorphicPivotInverseSide<T extends object, O extends object>(prop: EntityProperty, owners: Primary<O>[][], where: FilterQuery<any>, orderBy?: OrderDefinition<T>, ctx?: Transaction, options?: FindOptions<T, any, any, any>): Promise<Dictionary<T[]>>;
|
|
79
|
+
/**
|
|
80
|
+
* Build a map from owner PKs to their related entities from pivot table results.
|
|
81
|
+
*/
|
|
82
|
+
private buildPivotResultMap;
|
|
83
|
+
private wrapPopulateFilter;
|
|
43
84
|
private getPivotOrderBy;
|
|
44
85
|
execute<T extends QueryResult | EntityData<AnyEntity> | EntityData<AnyEntity>[] = EntityData<AnyEntity>[]>(query: string | NativeQueryBuilder | RawQueryFragment, params?: any[], method?: 'all' | 'get' | 'run', ctx?: Transaction, loggerContext?: LoggingOptions): Promise<T>;
|
|
45
86
|
stream<T extends object>(entityName: EntityName<T>, where: FilterQuery<T>, options: StreamOptions<T, any, any, any>): AsyncIterableIterator<T>;
|
|
@@ -57,32 +98,56 @@ export declare abstract class AbstractSqlDriver<Connection extends AbstractSqlCo
|
|
|
57
98
|
* @internal
|
|
58
99
|
*/
|
|
59
100
|
mergeJoinedResult<T extends object>(rawResults: EntityData<T>[], meta: EntityMetadata<T>, joinedProps: PopulateOptions<T>[]): EntityData<T>[];
|
|
60
|
-
protected shouldHaveColumn<T, U>(meta: EntityMetadata<T>, prop: EntityProperty<U>, populate: readonly PopulateOptions<U>[], fields?: readonly
|
|
61
|
-
protected getFieldsForJoinedLoad<T extends object>(qb: QueryBuilder<T, any, any, any>, meta: EntityMetadata<T>, options: FieldsForJoinedLoadOptions<T>):
|
|
101
|
+
protected shouldHaveColumn<T, U>(meta: EntityMetadata<T>, prop: EntityProperty<U>, populate: readonly PopulateOptions<U>[], fields?: readonly InternalField<U>[], exclude?: readonly InternalField<U>[]): boolean;
|
|
102
|
+
protected getFieldsForJoinedLoad<T extends object>(qb: QueryBuilder<T, any, any, any>, meta: EntityMetadata<T>, options: FieldsForJoinedLoadOptions<T>): InternalField<T>[];
|
|
103
|
+
/**
|
|
104
|
+
* Adds LEFT JOINs and fields for TPT polymorphic loading when populating a relation to a TPT base class.
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
protected addTPTPolymorphicJoinsForRelation<T extends object>(qb: QueryBuilder<T, any, any, any>, meta: EntityMetadata<T>, baseAlias: string, fields: InternalField<T>[]): void;
|
|
108
|
+
/**
|
|
109
|
+
* Find the alias for a TPT child table in the query builder.
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
protected findTPTChildAlias<T extends object>(qb: QueryBuilder<T, any, any, any>, childMeta: EntityMetadata): string | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Builds a CASE WHEN expression for TPT discriminator.
|
|
115
|
+
* Determines concrete entity type based on which child table has a non-null PK.
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
buildTPTDiscriminatorExpression(meta: EntityMetadata, descendants: EntityMetadata[], aliasMap: Dictionary<string>, baseAlias: string): Raw;
|
|
119
|
+
/**
|
|
120
|
+
* Maps TPT child-specific fields during hydration.
|
|
121
|
+
* When a relation points to a TPT base class, the actual entity might be a child class.
|
|
122
|
+
* This method reads the discriminator to determine the concrete type and maps child-specific fields.
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
protected mapTPTChildFields<T extends object>(relationPojo: EntityData<T>, meta: EntityMetadata<T>, relationAlias: string, qb: QueryBuilder<T, any, any, any>, root: EntityData<T>): void;
|
|
62
126
|
/**
|
|
63
127
|
* @internal
|
|
64
128
|
*/
|
|
65
|
-
mapPropToFieldNames<T extends object>(qb: QueryBuilder<T, any, any, any>, prop: EntityProperty<T>, tableAlias: string, explicitFields?: readonly
|
|
129
|
+
mapPropToFieldNames<T extends object>(qb: QueryBuilder<T, any, any, any, any, any>, prop: EntityProperty<T>, tableAlias: string, meta: EntityMetadata<T>, schema?: string, explicitFields?: readonly InternalField<T>[]): InternalField<T>[];
|
|
66
130
|
/** @internal */
|
|
67
131
|
createQueryBuilder<T extends object>(entityName: EntityName<T> | QueryBuilder<T, any, any, any>, ctx?: Transaction, preferredConnectionType?: ConnectionType, convertCustomTypes?: boolean, loggerContext?: LoggingOptions, alias?: string, em?: SqlEntityManager): QueryBuilder<T, any, any, any>;
|
|
68
132
|
protected resolveConnectionType(args: {
|
|
69
133
|
ctx?: Transaction;
|
|
70
134
|
connectionType?: ConnectionType;
|
|
71
135
|
}): ConnectionType;
|
|
72
|
-
protected extractManyToMany<T>(
|
|
73
|
-
protected processManyToMany<T extends object>(meta: EntityMetadata<T
|
|
136
|
+
protected extractManyToMany<T>(meta: EntityMetadata<T>, data: EntityDictionary<T>): EntityData<T>;
|
|
137
|
+
protected processManyToMany<T extends object>(meta: EntityMetadata<T>, pks: Primary<T>[], collections: EntityData<T>, clear: boolean, options?: DriverMethodOptions): Promise<void>;
|
|
74
138
|
lockPessimistic<T extends object>(entity: T, options: LockOptions): Promise<void>;
|
|
75
139
|
protected buildPopulateWhere<T extends object>(meta: EntityMetadata<T>, joinedProps: PopulateOptions<T>[], options: Pick<FindOptions<any>, 'populateWhere'>): ObjectQuery<T>;
|
|
76
140
|
protected buildOrderBy<T extends object>(qb: QueryBuilder<T, any, any, any>, meta: EntityMetadata<T>, populate: PopulateOptions<T>[], options: Pick<FindOptions<any>, 'strategy' | 'orderBy' | 'populateOrderBy'>): QueryOrderMap<T>[];
|
|
77
141
|
protected buildPopulateOrderBy<T extends object>(qb: QueryBuilder<T, any, any, any>, meta: EntityMetadata<T>, populateOrderBy: QueryOrderMap<T>[], parentPath: string, explicit: boolean, parentAlias?: string): QueryOrderMap<T>[];
|
|
78
142
|
protected buildJoinedPropsOrderBy<T extends object>(qb: QueryBuilder<T, any, any, any>, meta: EntityMetadata<T>, populate: PopulateOptions<T>[], options?: Pick<FindOptions<any>, 'strategy' | 'orderBy' | 'populateOrderBy'>, parentPath?: string): QueryOrderMap<T>[];
|
|
79
|
-
|
|
80
|
-
protected
|
|
81
|
-
protected
|
|
143
|
+
private buildToManyOrderBy;
|
|
144
|
+
protected normalizeFields<T extends object>(fields: InternalField<T>[], prefix?: string): string[];
|
|
145
|
+
protected processField<T extends object>(meta: EntityMetadata<T>, prop: EntityProperty<T> | undefined, field: string, ret: InternalField<T>[]): void;
|
|
146
|
+
protected buildFields<T extends object>(meta: EntityMetadata<T>, populate: PopulateOptions<T>[], joinedProps: PopulateOptions<T>[], qb: QueryBuilder<T, any, any, any>, alias: string, options: Pick<FindOptions<T, any, any, any>, 'strategy' | 'fields' | 'exclude'>, schema?: string): InternalField<T>[];
|
|
82
147
|
}
|
|
83
148
|
interface FieldsForJoinedLoadOptions<T extends object> {
|
|
84
|
-
explicitFields?: readonly
|
|
85
|
-
exclude?: readonly
|
|
149
|
+
explicitFields?: readonly InternalField<T>[];
|
|
150
|
+
exclude?: readonly InternalField<T>[];
|
|
86
151
|
populate?: readonly PopulateOptions<T>[];
|
|
87
152
|
strategy?: Options['loadStrategy'];
|
|
88
153
|
populateWhere?: FindOptions<any>['populateWhere'];
|
|
@@ -90,5 +155,6 @@ interface FieldsForJoinedLoadOptions<T extends object> {
|
|
|
90
155
|
parentTableAlias: string;
|
|
91
156
|
parentJoinPath?: string;
|
|
92
157
|
count?: boolean;
|
|
158
|
+
schema?: string;
|
|
93
159
|
}
|
|
94
160
|
export {};
|