@mikro-orm/knex 6.0.0-dev.23 → 6.0.0-dev.230
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 +22 -4
- package/AbstractSqlConnection.js +48 -18
- package/AbstractSqlDriver.d.ts +33 -25
- package/AbstractSqlDriver.js +576 -269
- package/AbstractSqlPlatform.d.ts +5 -4
- package/AbstractSqlPlatform.js +34 -5
- package/MonkeyPatchable.d.ts +1 -0
- package/MonkeyPatchable.js +3 -0
- package/PivotCollectionPersister.d.ts +17 -0
- package/PivotCollectionPersister.js +128 -0
- package/README.md +64 -107
- package/SqlEntityManager.d.ts +2 -6
- package/SqlEntityManager.js +4 -8
- package/SqlEntityRepository.d.ts +7 -6
- package/SqlEntityRepository.js +11 -8
- package/index.mjs +24 -5
- package/package.json +8 -8
- package/query/ArrayCriteriaNode.d.ts +5 -4
- package/query/ArrayCriteriaNode.js +7 -2
- package/query/CriteriaNode.d.ts +12 -10
- package/query/CriteriaNode.js +30 -17
- package/query/CriteriaNodeFactory.d.ts +6 -6
- package/query/CriteriaNodeFactory.js +33 -17
- package/query/ObjectCriteriaNode.d.ts +5 -4
- package/query/ObjectCriteriaNode.js +67 -27
- package/query/QueryBuilder.d.ts +58 -26
- package/query/QueryBuilder.js +444 -148
- package/query/QueryBuilderHelper.d.ts +13 -18
- package/query/QueryBuilderHelper.js +194 -167
- package/query/ScalarCriteriaNode.d.ts +4 -3
- package/query/ScalarCriteriaNode.js +18 -8
- package/query/enums.d.ts +7 -0
- package/query/enums.js +10 -2
- package/schema/DatabaseSchema.d.ts +5 -2
- package/schema/DatabaseSchema.js +28 -10
- package/schema/DatabaseTable.d.ts +13 -5
- package/schema/DatabaseTable.js +385 -60
- package/schema/SchemaComparator.d.ts +7 -5
- package/schema/SchemaComparator.js +68 -35
- package/schema/SchemaHelper.d.ts +7 -5
- package/schema/SchemaHelper.js +25 -11
- package/schema/SqlSchemaGenerator.d.ts +3 -6
- package/schema/SqlSchemaGenerator.js +71 -36
- package/typings.d.ts +30 -11
|
@@ -1,28 +1,46 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
3
|
-
import { Connection } from '@mikro-orm/core';
|
|
1
|
+
import { type Knex } from 'knex';
|
|
2
|
+
import { Connection, type AnyEntity, type Configuration, type ConnectionOptions, type EntityData, type IsolationLevel, type QueryResult, type Transaction, type TransactionEventBroadcaster, type LoggingOptions } from '@mikro-orm/core';
|
|
4
3
|
import type { AbstractSqlPlatform } from './AbstractSqlPlatform';
|
|
5
4
|
export declare abstract class AbstractSqlConnection extends Connection {
|
|
6
5
|
private static __patched;
|
|
7
6
|
protected platform: AbstractSqlPlatform;
|
|
8
7
|
protected client: Knex;
|
|
9
8
|
constructor(config: Configuration, options?: ConnectionOptions, type?: 'read' | 'write');
|
|
9
|
+
abstract createKnex(): void;
|
|
10
|
+
/** @inheritDoc */
|
|
11
|
+
connect(): void | Promise<void>;
|
|
10
12
|
getKnex(): Knex;
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
11
16
|
close(force?: boolean): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
12
20
|
isConnected(): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
checkConnection(): Promise<{
|
|
25
|
+
ok: boolean;
|
|
26
|
+
reason?: string;
|
|
27
|
+
error?: Error;
|
|
28
|
+
}>;
|
|
13
29
|
transactional<T>(cb: (trx: Transaction<Knex.Transaction>) => Promise<T>, options?: {
|
|
14
30
|
isolationLevel?: IsolationLevel;
|
|
31
|
+
readOnly?: boolean;
|
|
15
32
|
ctx?: Knex.Transaction;
|
|
16
33
|
eventBroadcaster?: TransactionEventBroadcaster;
|
|
17
34
|
}): Promise<T>;
|
|
18
35
|
begin(options?: {
|
|
19
36
|
isolationLevel?: IsolationLevel;
|
|
37
|
+
readOnly?: boolean;
|
|
20
38
|
ctx?: Knex.Transaction;
|
|
21
39
|
eventBroadcaster?: TransactionEventBroadcaster;
|
|
22
40
|
}): Promise<Knex.Transaction>;
|
|
23
41
|
commit(ctx: Knex.Transaction, eventBroadcaster?: TransactionEventBroadcaster): Promise<void>;
|
|
24
42
|
rollback(ctx: Knex.Transaction, eventBroadcaster?: TransactionEventBroadcaster): Promise<void>;
|
|
25
|
-
execute<T extends QueryResult | EntityData<AnyEntity> | EntityData<AnyEntity>[] = EntityData<AnyEntity>[]>(queryOrKnex: string | Knex.QueryBuilder | Knex.Raw, params?: unknown[], method?: 'all' | 'get' | 'run', ctx?: Transaction): Promise<T>;
|
|
43
|
+
execute<T extends QueryResult | EntityData<AnyEntity> | EntityData<AnyEntity>[] = EntityData<AnyEntity>[]>(queryOrKnex: string | Knex.QueryBuilder | Knex.Raw, params?: unknown[], method?: 'all' | 'get' | 'run', ctx?: Transaction, logging?: LoggingOptions): Promise<T>;
|
|
26
44
|
/**
|
|
27
45
|
* Execute raw SQL queries from file
|
|
28
46
|
*/
|
package/AbstractSqlConnection.js
CHANGED
|
@@ -10,26 +10,53 @@ function isRootTransaction(trx) {
|
|
|
10
10
|
return !Object.getOwnPropertySymbols(trx).includes(parentTransactionSymbol);
|
|
11
11
|
}
|
|
12
12
|
class AbstractSqlConnection extends core_1.Connection {
|
|
13
|
+
static __patched = false;
|
|
14
|
+
client;
|
|
13
15
|
constructor(config, options, type) {
|
|
14
16
|
super(config, options, type);
|
|
15
17
|
this.patchKnexClient();
|
|
16
18
|
}
|
|
19
|
+
/** @inheritDoc */
|
|
20
|
+
connect() {
|
|
21
|
+
this.createKnex();
|
|
22
|
+
}
|
|
17
23
|
getKnex() {
|
|
24
|
+
if (!this.client) {
|
|
25
|
+
this.createKnex();
|
|
26
|
+
}
|
|
18
27
|
return this.client;
|
|
19
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
20
32
|
async close(force) {
|
|
21
33
|
await super.close(force);
|
|
22
|
-
await this.
|
|
34
|
+
await this.getKnex().destroy();
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
24
39
|
async isConnected() {
|
|
25
40
|
try {
|
|
26
|
-
await this.
|
|
41
|
+
await this.getKnex().raw('select 1');
|
|
27
42
|
return true;
|
|
28
43
|
}
|
|
29
44
|
catch {
|
|
30
45
|
return false;
|
|
31
46
|
}
|
|
32
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
async checkConnection() {
|
|
52
|
+
try {
|
|
53
|
+
await this.getKnex().raw('select 1');
|
|
54
|
+
return { ok: true };
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
return { ok: false, reason: error.message, error };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
33
60
|
async transactional(cb, options = {}) {
|
|
34
61
|
const trx = await this.begin(options);
|
|
35
62
|
try {
|
|
@@ -46,7 +73,10 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
46
73
|
if (!options.ctx) {
|
|
47
74
|
await options.eventBroadcaster?.dispatchEvent(core_1.EventType.beforeTransactionStart);
|
|
48
75
|
}
|
|
49
|
-
const trx = await (options.ctx || this.
|
|
76
|
+
const trx = await (options.ctx || this.getKnex()).transaction(null, {
|
|
77
|
+
isolationLevel: options.isolationLevel,
|
|
78
|
+
readOnly: options.readOnly,
|
|
79
|
+
});
|
|
50
80
|
if (!options.ctx) {
|
|
51
81
|
await options.eventBroadcaster?.dispatchEvent(core_1.EventType.afterTransactionStart, trx);
|
|
52
82
|
}
|
|
@@ -76,30 +106,31 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
76
106
|
await eventBroadcaster?.dispatchEvent(core_1.EventType.afterTransactionRollback, ctx);
|
|
77
107
|
}
|
|
78
108
|
}
|
|
79
|
-
async execute(queryOrKnex, params = [], method = 'all', ctx) {
|
|
109
|
+
async execute(queryOrKnex, params = [], method = 'all', ctx, logging) {
|
|
110
|
+
await this.ensureConnection();
|
|
80
111
|
if (core_1.Utils.isObject(queryOrKnex)) {
|
|
81
|
-
ctx
|
|
112
|
+
ctx ??= (queryOrKnex.client.transacting ? queryOrKnex : null);
|
|
82
113
|
const q = queryOrKnex.toSQL();
|
|
83
114
|
queryOrKnex = q.sql;
|
|
84
115
|
params = q.bindings;
|
|
85
116
|
}
|
|
86
117
|
const formatted = this.platform.formatQuery(queryOrKnex, params);
|
|
87
|
-
const sql = this.getSql(queryOrKnex, formatted);
|
|
88
|
-
|
|
89
|
-
const query = this.
|
|
118
|
+
const sql = this.getSql(queryOrKnex, formatted, logging);
|
|
119
|
+
return this.executeQuery(sql, async () => {
|
|
120
|
+
const query = this.getKnex().raw(formatted);
|
|
90
121
|
if (ctx) {
|
|
91
122
|
query.transacting(ctx);
|
|
92
123
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
124
|
+
const res = await query;
|
|
125
|
+
return this.transformRawResult(res, method);
|
|
126
|
+
}, { query: queryOrKnex, params, ...logging });
|
|
96
127
|
}
|
|
97
128
|
/**
|
|
98
129
|
* Execute raw SQL queries from file
|
|
99
130
|
*/
|
|
100
131
|
async loadFile(path) {
|
|
101
132
|
const buf = await (0, fs_extra_1.readFile)(path);
|
|
102
|
-
await this.
|
|
133
|
+
await this.getKnex().raw(buf.toString());
|
|
103
134
|
}
|
|
104
135
|
createKnexClient(type) {
|
|
105
136
|
const driverOptions = this.config.get('driverOptions');
|
|
@@ -115,7 +146,7 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
115
146
|
});
|
|
116
147
|
}
|
|
117
148
|
getKnexOptions(type) {
|
|
118
|
-
const config = core_1.Utils.
|
|
149
|
+
const config = core_1.Utils.mergeConfig({
|
|
119
150
|
client: type,
|
|
120
151
|
connection: this.getConnectionOptions(),
|
|
121
152
|
pool: this.config.get('pool'),
|
|
@@ -138,15 +169,15 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
138
169
|
};
|
|
139
170
|
return config;
|
|
140
171
|
}
|
|
141
|
-
getSql(query, formatted) {
|
|
172
|
+
getSql(query, formatted, context) {
|
|
142
173
|
const logger = this.config.getLogger();
|
|
143
|
-
if (!logger.isEnabled('query')) {
|
|
174
|
+
if (!logger.isEnabled('query', context)) {
|
|
144
175
|
return query;
|
|
145
176
|
}
|
|
146
|
-
if (logger.isEnabled('query-params')) {
|
|
177
|
+
if (logger.isEnabled('query-params', context)) {
|
|
147
178
|
return formatted;
|
|
148
179
|
}
|
|
149
|
-
return this.
|
|
180
|
+
return this.getKnex().client.positionBindings(query);
|
|
150
181
|
}
|
|
151
182
|
/**
|
|
152
183
|
* do not call `positionBindings` when there are no bindings - it was messing up with
|
|
@@ -178,4 +209,3 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
178
209
|
}
|
|
179
210
|
}
|
|
180
211
|
exports.AbstractSqlConnection = AbstractSqlConnection;
|
|
181
|
-
AbstractSqlConnection.__patched = false;
|
package/AbstractSqlDriver.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Knex } from 'knex';
|
|
2
|
-
import type
|
|
3
|
-
import { DatabaseDriver, EntityManagerType } from '@mikro-orm/core';
|
|
2
|
+
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 IDatabaseDriver, type LockOptions, type LoggingOptions, type NativeInsertUpdateManyOptions, type NativeInsertUpdateOptions, type Options, type OrderDefinition, type PopulateOptions, type Primary, type QueryOrderMap, type QueryResult, type Transaction, type UpsertManyOptions, type UpsertOptions } from '@mikro-orm/core';
|
|
4
3
|
import type { AbstractSqlConnection } from './AbstractSqlConnection';
|
|
5
4
|
import type { AbstractSqlPlatform } from './AbstractSqlPlatform';
|
|
6
5
|
import { QueryBuilder, QueryType } from './query';
|
|
@@ -14,53 +13,62 @@ export declare abstract class AbstractSqlDriver<Connection extends AbstractSqlCo
|
|
|
14
13
|
protected constructor(config: Configuration, platform: Platform, connection: Constructor<Connection>, connector: string[]);
|
|
15
14
|
getPlatform(): Platform;
|
|
16
15
|
createEntityManager<D extends IDatabaseDriver = IDatabaseDriver>(useContext?: boolean): D[typeof EntityManagerType];
|
|
17
|
-
find<T extends object, P extends string = never>(entityName: string, where: FilterQuery<T>, options?: FindOptions<T, P>): Promise<EntityData<T>[]>;
|
|
18
|
-
findOne<T extends object, P extends string = never>(entityName: string, where: FilterQuery<T>, options?: FindOneOptions<T, P>): Promise<EntityData<T> | null>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
protected
|
|
23
|
-
protected wrapVirtualExpressionInSubquery<T extends object>(meta: EntityMetadata<T>, expression: string, where: FilterQuery<T>, options: FindOptions<T, any
|
|
16
|
+
find<T extends object, P extends string = never, F extends string = '*'>(entityName: string, where: FilterQuery<T>, options?: FindOptions<T, P, F>): Promise<EntityData<T>[]>;
|
|
17
|
+
findOne<T extends object, P extends string = never, F extends string = '*'>(entityName: string, where: FilterQuery<T>, options?: FindOneOptions<T, P, F>): Promise<EntityData<T> | null>;
|
|
18
|
+
protected hasToManyJoins<T extends object>(hint: PopulateOptions<T>, meta: EntityMetadata<T>): boolean;
|
|
19
|
+
findVirtual<T extends object>(entityName: string, where: FilterQuery<T>, options: FindOptions<T, any, any>): Promise<EntityData<T>[]>;
|
|
20
|
+
countVirtual<T extends object>(entityName: string, where: FilterQuery<T>, options: CountOptions<T, any>): Promise<number>;
|
|
21
|
+
protected findFromVirtual<T extends object>(entityName: string, where: FilterQuery<T>, options: FindOptions<T, any> | CountOptions<T, any>, type: QueryType): Promise<EntityData<T>[] | number>;
|
|
22
|
+
protected wrapVirtualExpressionInSubquery<T extends object>(meta: EntityMetadata<T>, expression: string, where: FilterQuery<T>, options: FindOptions<T, any>, type: QueryType): Promise<T[] | number>;
|
|
24
23
|
mapResult<T extends object>(result: EntityData<T>, meta: EntityMetadata<T>, populate?: PopulateOptions<T>[], qb?: QueryBuilder<T>, map?: Dictionary): EntityData<T> | null;
|
|
25
24
|
private mapJoinedProps;
|
|
26
|
-
private appendToCollection;
|
|
27
25
|
count<T extends object>(entityName: string, where: any, options?: CountOptions<T>): Promise<number>;
|
|
28
26
|
nativeInsert<T extends object>(entityName: string, data: EntityDictionary<T>, options?: NativeInsertUpdateOptions<T>): Promise<QueryResult<T>>;
|
|
29
27
|
nativeInsertMany<T extends object>(entityName: string, data: EntityDictionary<T>[], options?: NativeInsertUpdateManyOptions<T>): Promise<QueryResult<T>>;
|
|
30
|
-
nativeUpdate<T extends object>(entityName: string, where: FilterQuery<T>, data: EntityDictionary<T>, options?: NativeInsertUpdateOptions<T>): Promise<QueryResult<T>>;
|
|
31
|
-
nativeUpdateMany<T extends object>(entityName: string, where: FilterQuery<T>[], data: EntityDictionary<T>[], options?: NativeInsertUpdateManyOptions<T>): Promise<QueryResult<T>>;
|
|
28
|
+
nativeUpdate<T extends object>(entityName: string, where: FilterQuery<T>, data: EntityDictionary<T>, options?: NativeInsertUpdateOptions<T> & UpsertOptions<T>): Promise<QueryResult<T>>;
|
|
29
|
+
nativeUpdateMany<T extends object>(entityName: string, where: FilterQuery<T>[], data: EntityDictionary<T>[], options?: NativeInsertUpdateManyOptions<T> & UpsertManyOptions<T>): Promise<QueryResult<T>>;
|
|
32
30
|
nativeDelete<T extends object>(entityName: string, where: FilterQuery<T> | string | any, options?: DeleteOptions<T>): Promise<QueryResult<T>>;
|
|
33
|
-
|
|
34
|
-
loadFromPivotTable<T extends object, O extends object>(prop: EntityProperty, owners: Primary<O>[][], where?: FilterQuery<any>, orderBy?:
|
|
31
|
+
syncCollections<T extends object, O extends object>(collections: Iterable<Collection<T, O>>, options?: DriverMethodOptions): Promise<void>;
|
|
32
|
+
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>, pivotJoin?: boolean): Promise<Dictionary<T[]>>;
|
|
33
|
+
private getPivotOrderBy;
|
|
35
34
|
execute<T extends QueryResult | EntityData<AnyEntity> | EntityData<AnyEntity>[] = EntityData<AnyEntity>[]>(queryOrKnex: string | Knex.QueryBuilder | Knex.Raw, params?: any[], method?: 'all' | 'get' | 'run', ctx?: Transaction): Promise<T>;
|
|
36
35
|
/**
|
|
37
36
|
* 1:1 owner side needs to be marked for population so QB auto-joins the owner id
|
|
38
37
|
*/
|
|
39
|
-
protected autoJoinOneToOneOwner<T extends object, P extends string = never>(meta: EntityMetadata
|
|
40
|
-
protected joinedProps<T>(meta: EntityMetadata, populate: PopulateOptions<T>[]): PopulateOptions<T>[];
|
|
38
|
+
protected autoJoinOneToOneOwner<T extends object, P extends string = never>(meta: EntityMetadata<T>, populate: PopulateOptions<T>[], fields?: readonly EntityField<T, P>[]): PopulateOptions<T>[];
|
|
41
39
|
/**
|
|
42
40
|
* @internal
|
|
43
41
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
joinedProps<T>(meta: EntityMetadata, populate: PopulateOptions<T>[], options?: {
|
|
43
|
+
strategy?: Options['loadStrategy'];
|
|
44
|
+
}): PopulateOptions<T>[];
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
mergeJoinedResult<T extends object>(rawResults: EntityData<T>[], meta: EntityMetadata<T>, joinedProps: PopulateOptions<T>[]): EntityData<T>[];
|
|
49
|
+
protected getFieldsForJoinedLoad<T extends object>(qb: QueryBuilder<T>, meta: EntityMetadata<T>, explicitFields?: Field<T>[], populate?: PopulateOptions<T>[], options?: {
|
|
50
|
+
strategy?: Options['loadStrategy'];
|
|
51
|
+
populateWhere?: FindOptions<any>['populateWhere'];
|
|
52
|
+
}, parentTableAlias?: string, parentJoinPath?: string): Field<T>[];
|
|
46
53
|
/**
|
|
47
54
|
* @internal
|
|
48
55
|
*/
|
|
49
56
|
mapPropToFieldNames<T extends object>(qb: QueryBuilder<T>, prop: EntityProperty<T>, tableAlias?: string): Field<T>[];
|
|
50
57
|
/** @internal */
|
|
51
|
-
createQueryBuilder<T extends object>(entityName: EntityName<T> | QueryBuilder<T>, ctx?: Transaction<Knex.Transaction>, preferredConnectionType?: ConnectionType, convertCustomTypes?: boolean): QueryBuilder<T>;
|
|
58
|
+
createQueryBuilder<T extends object>(entityName: EntityName<T> | QueryBuilder<T>, ctx?: Transaction<Knex.Transaction>, preferredConnectionType?: ConnectionType, convertCustomTypes?: boolean, logging?: LoggingOptions): QueryBuilder<T>;
|
|
52
59
|
protected resolveConnectionType(args: {
|
|
53
60
|
ctx?: Transaction<Knex.Transaction>;
|
|
54
61
|
connectionType?: ConnectionType;
|
|
55
62
|
}): ConnectionType;
|
|
56
63
|
protected extractManyToMany<T>(entityName: string, data: EntityDictionary<T>): EntityData<T>;
|
|
57
64
|
protected processManyToMany<T extends object>(meta: EntityMetadata<T> | undefined, pks: Primary<T>[], collections: EntityData<T>, clear: boolean, options?: DriverMethodOptions): Promise<void>;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
protected buildJoinedPropsOrderBy<T extends object>(entityName: string, qb: QueryBuilder<T>, meta: EntityMetadata<T>, populate: PopulateOptions<T>[], parentPath?: string): QueryOrderMap<T>[];
|
|
65
|
+
lockPessimistic<T extends object>(entity: T, options: LockOptions): Promise<void>;
|
|
66
|
+
protected buildOrderBy<T extends object>(qb: QueryBuilder<T>, meta: EntityMetadata<T>, populate: PopulateOptions<T>[], options: Pick<FindOptions<any>, 'strategy' | 'orderBy' | 'populateOrderBy'>): QueryOrderMap<T>[];
|
|
67
|
+
protected buildPopulateOrderBy<T extends object>(qb: QueryBuilder<T>, meta: EntityMetadata<T>, populateOrderBy: QueryOrderMap<T>[], parentPath: string, parentAlias?: string): QueryOrderMap<T>[];
|
|
68
|
+
protected buildJoinedPropsOrderBy<T extends object>(qb: QueryBuilder<T>, meta: EntityMetadata<T>, populate: PopulateOptions<T>[], options?: Pick<FindOptions<any>, 'strategy' | 'orderBy' | 'populateOrderBy'>, parentPath?: string): QueryOrderMap<T>[];
|
|
63
69
|
protected normalizeFields<T extends object>(fields: Field<T>[], prefix?: string): string[];
|
|
64
70
|
protected processField<T extends object>(meta: EntityMetadata<T>, prop: EntityProperty<T> | undefined, field: string, ret: Field<T>[], populate: PopulateOptions<T>[], joinedProps: PopulateOptions<T>[], qb: QueryBuilder<T>): void;
|
|
65
|
-
protected buildFields<T extends object>(meta: EntityMetadata<T>, populate: PopulateOptions<T>[], joinedProps: PopulateOptions<T>[], qb: QueryBuilder<T>, fields?: Field<T>[]
|
|
71
|
+
protected buildFields<T extends object>(meta: EntityMetadata<T>, populate: PopulateOptions<T>[], joinedProps: PopulateOptions<T>[], qb: QueryBuilder<T>, alias: string, fields?: Field<T>[], options?: {
|
|
72
|
+
strategy?: Options['loadStrategy'];
|
|
73
|
+
}): Field<T>[];
|
|
66
74
|
}
|