@mikro-orm/knex 6.0.0-dev.32 → 6.0.0-dev.321
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 +45 -20
- package/AbstractSqlDriver.d.ts +30 -24
- package/AbstractSqlDriver.js +606 -268
- package/AbstractSqlPlatform.d.ts +9 -5
- package/AbstractSqlPlatform.js +25 -29
- 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 +4 -8
- package/SqlEntityManager.js +8 -12
- package/SqlEntityRepository.d.ts +7 -5
- package/SqlEntityRepository.js +11 -7
- package/index.mjs +24 -3
- package/package.json +8 -8
- package/query/ArrayCriteriaNode.d.ts +3 -2
- package/query/ArrayCriteriaNode.js +7 -2
- package/query/CriteriaNode.d.ts +6 -4
- package/query/CriteriaNode.js +22 -9
- package/query/CriteriaNodeFactory.d.ts +1 -1
- package/query/CriteriaNodeFactory.js +27 -11
- package/query/ObjectCriteriaNode.d.ts +3 -2
- package/query/ObjectCriteriaNode.js +72 -28
- package/query/QueryBuilder.d.ts +69 -36
- package/query/QueryBuilder.js +469 -146
- package/query/QueryBuilderHelper.d.ts +13 -18
- package/query/QueryBuilderHelper.js +199 -171
- package/query/ScalarCriteriaNode.d.ts +3 -2
- package/query/ScalarCriteriaNode.js +14 -4
- package/query/enums.d.ts +7 -0
- package/query/enums.js +10 -2
- package/schema/DatabaseSchema.d.ts +5 -2
- package/schema/DatabaseSchema.js +26 -8
- package/schema/DatabaseTable.d.ts +12 -4
- package/schema/DatabaseTable.js +370 -42
- package/schema/SchemaComparator.d.ts +7 -5
- package/schema/SchemaComparator.js +69 -35
- package/schema/SchemaHelper.d.ts +7 -5
- package/schema/SchemaHelper.js +30 -11
- package/schema/SqlSchemaGenerator.d.ts +11 -48
- package/schema/SqlSchemaGenerator.js +84 -30
- package/typings.d.ts +27 -8
|
@@ -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, loggerContext?: LoggingOptions): Promise<T>;
|
|
26
44
|
/**
|
|
27
45
|
* Execute raw SQL queries from file
|
|
28
46
|
*/
|
package/AbstractSqlConnection.js
CHANGED
|
@@ -10,24 +10,46 @@ 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() {
|
|
40
|
+
const check = await this.checkConnection();
|
|
41
|
+
return check.ok;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
async checkConnection() {
|
|
25
47
|
try {
|
|
26
|
-
await this.
|
|
27
|
-
return true;
|
|
48
|
+
await this.getKnex().raw('select 1');
|
|
49
|
+
return { ok: true };
|
|
28
50
|
}
|
|
29
|
-
catch {
|
|
30
|
-
return false;
|
|
51
|
+
catch (error) {
|
|
52
|
+
return { ok: false, reason: error.message, error };
|
|
31
53
|
}
|
|
32
54
|
}
|
|
33
55
|
async transactional(cb, options = {}) {
|
|
@@ -46,7 +68,10 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
46
68
|
if (!options.ctx) {
|
|
47
69
|
await options.eventBroadcaster?.dispatchEvent(core_1.EventType.beforeTransactionStart);
|
|
48
70
|
}
|
|
49
|
-
const trx = await (options.ctx || this.
|
|
71
|
+
const trx = await (options.ctx || this.getKnex()).transaction(null, {
|
|
72
|
+
isolationLevel: options.isolationLevel,
|
|
73
|
+
readOnly: options.readOnly,
|
|
74
|
+
});
|
|
50
75
|
if (!options.ctx) {
|
|
51
76
|
await options.eventBroadcaster?.dispatchEvent(core_1.EventType.afterTransactionStart, trx);
|
|
52
77
|
}
|
|
@@ -76,7 +101,8 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
76
101
|
await eventBroadcaster?.dispatchEvent(core_1.EventType.afterTransactionRollback, ctx);
|
|
77
102
|
}
|
|
78
103
|
}
|
|
79
|
-
async execute(queryOrKnex, params = [], method = 'all', ctx) {
|
|
104
|
+
async execute(queryOrKnex, params = [], method = 'all', ctx, loggerContext) {
|
|
105
|
+
await this.ensureConnection();
|
|
80
106
|
if (core_1.Utils.isObject(queryOrKnex)) {
|
|
81
107
|
ctx ??= (queryOrKnex.client.transacting ? queryOrKnex : null);
|
|
82
108
|
const q = queryOrKnex.toSQL();
|
|
@@ -84,22 +110,22 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
84
110
|
params = q.bindings;
|
|
85
111
|
}
|
|
86
112
|
const formatted = this.platform.formatQuery(queryOrKnex, params);
|
|
87
|
-
const sql = this.getSql(queryOrKnex, formatted);
|
|
88
|
-
|
|
89
|
-
const query = this.
|
|
113
|
+
const sql = this.getSql(queryOrKnex, formatted, loggerContext);
|
|
114
|
+
return this.executeQuery(sql, async () => {
|
|
115
|
+
const query = this.getKnex().raw(formatted);
|
|
90
116
|
if (ctx) {
|
|
91
117
|
query.transacting(ctx);
|
|
92
118
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
119
|
+
const res = await query;
|
|
120
|
+
return this.transformRawResult(res, method);
|
|
121
|
+
}, { query: queryOrKnex, params, ...loggerContext });
|
|
96
122
|
}
|
|
97
123
|
/**
|
|
98
124
|
* Execute raw SQL queries from file
|
|
99
125
|
*/
|
|
100
126
|
async loadFile(path) {
|
|
101
127
|
const buf = await (0, fs_extra_1.readFile)(path);
|
|
102
|
-
await this.
|
|
128
|
+
await this.getKnex().raw(buf.toString());
|
|
103
129
|
}
|
|
104
130
|
createKnexClient(type) {
|
|
105
131
|
const driverOptions = this.config.get('driverOptions');
|
|
@@ -115,7 +141,7 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
115
141
|
});
|
|
116
142
|
}
|
|
117
143
|
getKnexOptions(type) {
|
|
118
|
-
const config = core_1.Utils.
|
|
144
|
+
const config = core_1.Utils.mergeConfig({
|
|
119
145
|
client: type,
|
|
120
146
|
connection: this.getConnectionOptions(),
|
|
121
147
|
pool: this.config.get('pool'),
|
|
@@ -138,15 +164,15 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
138
164
|
};
|
|
139
165
|
return config;
|
|
140
166
|
}
|
|
141
|
-
getSql(query, formatted) {
|
|
167
|
+
getSql(query, formatted, context) {
|
|
142
168
|
const logger = this.config.getLogger();
|
|
143
|
-
if (!logger.isEnabled('query')) {
|
|
169
|
+
if (!logger.isEnabled('query', context)) {
|
|
144
170
|
return query;
|
|
145
171
|
}
|
|
146
|
-
if (logger.isEnabled('query-params')) {
|
|
172
|
+
if (logger.isEnabled('query-params', context)) {
|
|
147
173
|
return formatted;
|
|
148
174
|
}
|
|
149
|
-
return this.
|
|
175
|
+
return this.getKnex().client.positionBindings(query);
|
|
150
176
|
}
|
|
151
177
|
/**
|
|
152
178
|
* do not call `positionBindings` when there are no bindings - it was messing up with
|
|
@@ -178,4 +204,3 @@ class AbstractSqlConnection extends core_1.Connection {
|
|
|
178
204
|
}
|
|
179
205
|
}
|
|
180
206
|
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,60 @@ 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 = '*', E extends string = never>(entityName: string, where: FilterQuery<T>, options?: FindOptions<T, P, F, E>): Promise<EntityData<T>[]>;
|
|
17
|
+
findOne<T extends object, P extends string = never, F extends string = '*', E extends string = never>(entityName: string, where: FilterQuery<T>, options?: FindOneOptions<T, P, F, E>): 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, 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, 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
|
|
40
|
-
protected joinedProps<T>(meta: EntityMetadata, populate: PopulateOptions<T>[]): PopulateOptions<T>[];
|
|
38
|
+
protected autoJoinOneToOneOwner<T extends object>(meta: EntityMetadata<T>, populate: PopulateOptions<T>[], fields?: readonly EntityField<T, any>[]): 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>[], exclude?: 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, loggerContext?: 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
|
-
protected updateCollectionDiff<T extends object, O extends object>(meta: EntityMetadata<O>, prop: EntityProperty<T>, pks: Primary<O>[], deleteDiff: Primary<T>[][] | boolean, insertDiff: Primary<T>[][], options?: DriverMethodOptions & {
|
|
59
|
-
ownerSchema?: string;
|
|
60
|
-
}): Promise<void>;
|
|
61
65
|
lockPessimistic<T extends object>(entity: T, options: LockOptions): Promise<void>;
|
|
62
|
-
protected
|
|
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>,
|
|
71
|
+
protected buildFields<T extends object>(meta: EntityMetadata<T>, populate: PopulateOptions<T>[], joinedProps: PopulateOptions<T>[], qb: QueryBuilder<T>, alias: string, options: Pick<FindOptions<T, any, any, any>, 'strategy' | 'fields' | 'exclude'>): Field<T>[];
|
|
66
72
|
}
|