@mikro-orm/core 7.0.0-dev.2 → 7.0.0-dev.200
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/EntityManager.d.ts +111 -61
- package/EntityManager.js +346 -300
- package/MikroORM.d.ts +44 -35
- package/MikroORM.js +103 -143
- package/README.md +3 -2
- package/cache/FileCacheAdapter.d.ts +1 -1
- package/cache/FileCacheAdapter.js +8 -7
- package/cache/GeneratedCacheAdapter.d.ts +0 -1
- package/cache/GeneratedCacheAdapter.js +0 -2
- package/cache/index.d.ts +0 -1
- package/cache/index.js +0 -1
- package/connections/Connection.d.ts +16 -7
- package/connections/Connection.js +23 -14
- package/drivers/DatabaseDriver.d.ts +25 -16
- package/drivers/DatabaseDriver.js +80 -35
- package/drivers/IDatabaseDriver.d.ts +47 -17
- package/entity/BaseEntity.d.ts +2 -2
- package/entity/BaseEntity.js +0 -3
- package/entity/Collection.d.ts +95 -31
- package/entity/Collection.js +444 -102
- package/entity/EntityAssigner.d.ts +1 -1
- package/entity/EntityAssigner.js +26 -18
- package/entity/EntityFactory.d.ts +13 -1
- package/entity/EntityFactory.js +88 -54
- package/entity/EntityHelper.d.ts +2 -2
- package/entity/EntityHelper.js +38 -15
- package/entity/EntityLoader.d.ts +8 -7
- package/entity/EntityLoader.js +134 -80
- package/entity/EntityRepository.d.ts +24 -4
- package/entity/EntityRepository.js +8 -2
- package/entity/Reference.d.ts +9 -12
- package/entity/Reference.js +34 -9
- package/entity/WrappedEntity.d.ts +2 -7
- package/entity/WrappedEntity.js +3 -8
- package/entity/defineEntity.d.ts +585 -0
- package/entity/defineEntity.js +533 -0
- package/entity/index.d.ts +3 -2
- package/entity/index.js +3 -2
- package/entity/utils.d.ts +7 -0
- package/entity/utils.js +16 -4
- package/entity/validators.d.ts +11 -0
- package/entity/validators.js +65 -0
- package/enums.d.ts +22 -6
- package/enums.js +15 -1
- package/errors.d.ts +23 -9
- package/errors.js +59 -21
- package/events/EventManager.d.ts +2 -1
- package/events/EventManager.js +19 -11
- package/events/EventSubscriber.d.ts +3 -1
- package/hydration/Hydrator.js +1 -2
- package/hydration/ObjectHydrator.d.ts +4 -4
- package/hydration/ObjectHydrator.js +53 -33
- package/index.d.ts +2 -2
- package/index.js +1 -2
- package/logging/DefaultLogger.d.ts +1 -1
- package/logging/DefaultLogger.js +1 -0
- package/logging/SimpleLogger.d.ts +1 -1
- package/logging/colors.d.ts +1 -1
- package/logging/colors.js +7 -6
- package/logging/index.d.ts +1 -0
- package/logging/index.js +1 -0
- package/logging/inspect.d.ts +2 -0
- package/logging/inspect.js +11 -0
- package/metadata/EntitySchema.d.ts +26 -26
- package/metadata/EntitySchema.js +82 -51
- package/metadata/MetadataDiscovery.d.ts +7 -10
- package/metadata/MetadataDiscovery.js +408 -335
- package/metadata/MetadataProvider.d.ts +11 -2
- package/metadata/MetadataProvider.js +46 -2
- package/metadata/MetadataStorage.d.ts +13 -11
- package/metadata/MetadataStorage.js +70 -37
- package/metadata/MetadataValidator.d.ts +17 -9
- package/metadata/MetadataValidator.js +100 -42
- package/metadata/discover-entities.d.ts +5 -0
- package/metadata/discover-entities.js +40 -0
- package/metadata/index.d.ts +1 -1
- package/metadata/index.js +1 -1
- package/metadata/types.d.ts +502 -0
- package/metadata/types.js +1 -0
- package/naming-strategy/AbstractNamingStrategy.d.ts +12 -4
- package/naming-strategy/AbstractNamingStrategy.js +14 -2
- package/naming-strategy/EntityCaseNamingStrategy.d.ts +3 -3
- package/naming-strategy/EntityCaseNamingStrategy.js +6 -5
- package/naming-strategy/MongoNamingStrategy.d.ts +3 -3
- package/naming-strategy/MongoNamingStrategy.js +6 -6
- package/naming-strategy/NamingStrategy.d.ts +24 -4
- package/naming-strategy/UnderscoreNamingStrategy.d.ts +3 -3
- package/naming-strategy/UnderscoreNamingStrategy.js +6 -6
- package/not-supported.d.ts +2 -0
- package/not-supported.js +4 -0
- package/package.json +19 -11
- package/platforms/ExceptionConverter.js +1 -1
- package/platforms/Platform.d.ts +7 -13
- package/platforms/Platform.js +20 -43
- package/serialization/EntitySerializer.d.ts +5 -0
- package/serialization/EntitySerializer.js +47 -27
- package/serialization/EntityTransformer.js +28 -18
- package/serialization/SerializationContext.d.ts +6 -6
- package/serialization/SerializationContext.js +16 -13
- package/types/ArrayType.d.ts +1 -1
- package/types/ArrayType.js +2 -3
- package/types/BigIntType.d.ts +9 -6
- package/types/BigIntType.js +4 -1
- package/types/BlobType.d.ts +0 -1
- package/types/BlobType.js +0 -3
- package/types/BooleanType.d.ts +2 -1
- package/types/BooleanType.js +3 -0
- package/types/DecimalType.d.ts +6 -4
- package/types/DecimalType.js +3 -3
- package/types/DoubleType.js +2 -2
- package/types/EnumArrayType.js +1 -2
- package/types/JsonType.d.ts +1 -1
- package/types/JsonType.js +7 -2
- package/types/TinyIntType.js +1 -1
- package/types/Type.d.ts +2 -4
- package/types/Type.js +3 -3
- package/types/Uint8ArrayType.d.ts +0 -1
- package/types/Uint8ArrayType.js +1 -4
- package/types/index.d.ts +1 -1
- package/typings.d.ts +300 -140
- package/typings.js +62 -44
- package/unit-of-work/ChangeSet.d.ts +2 -6
- package/unit-of-work/ChangeSet.js +4 -5
- package/unit-of-work/ChangeSetComputer.d.ts +1 -3
- package/unit-of-work/ChangeSetComputer.js +26 -13
- package/unit-of-work/ChangeSetPersister.d.ts +5 -4
- package/unit-of-work/ChangeSetPersister.js +77 -35
- package/unit-of-work/CommitOrderCalculator.d.ts +12 -10
- package/unit-of-work/CommitOrderCalculator.js +13 -13
- package/unit-of-work/IdentityMap.d.ts +12 -0
- package/unit-of-work/IdentityMap.js +39 -1
- package/unit-of-work/UnitOfWork.d.ts +23 -3
- package/unit-of-work/UnitOfWork.js +199 -106
- package/utils/AbstractSchemaGenerator.d.ts +5 -5
- package/utils/AbstractSchemaGenerator.js +22 -17
- package/utils/AsyncContext.d.ts +6 -0
- package/utils/AsyncContext.js +42 -0
- package/utils/Configuration.d.ts +779 -207
- package/utils/Configuration.js +146 -190
- package/utils/ConfigurationLoader.d.ts +1 -54
- package/utils/ConfigurationLoader.js +1 -352
- package/utils/Cursor.d.ts +3 -6
- package/utils/Cursor.js +27 -11
- package/utils/DataloaderUtils.d.ts +15 -5
- package/utils/DataloaderUtils.js +65 -17
- package/utils/EntityComparator.d.ts +13 -9
- package/utils/EntityComparator.js +164 -89
- package/utils/QueryHelper.d.ts +14 -6
- package/utils/QueryHelper.js +88 -26
- package/utils/RawQueryFragment.d.ts +48 -25
- package/utils/RawQueryFragment.js +67 -66
- package/utils/RequestContext.js +2 -2
- package/utils/TransactionContext.js +2 -2
- package/utils/TransactionManager.d.ts +65 -0
- package/utils/TransactionManager.js +223 -0
- package/utils/Utils.d.ts +13 -120
- package/utils/Utils.js +104 -375
- package/utils/clone.js +8 -23
- package/utils/env-vars.d.ts +7 -0
- package/utils/env-vars.js +97 -0
- package/utils/fs-utils.d.ts +32 -0
- package/utils/fs-utils.js +178 -0
- package/utils/index.d.ts +2 -1
- package/utils/index.js +2 -1
- package/utils/upsert-utils.d.ts +9 -4
- package/utils/upsert-utils.js +55 -4
- package/decorators/Check.d.ts +0 -3
- package/decorators/Check.js +0 -13
- package/decorators/CreateRequestContext.d.ts +0 -3
- package/decorators/CreateRequestContext.js +0 -29
- package/decorators/Embeddable.d.ts +0 -8
- package/decorators/Embeddable.js +0 -11
- package/decorators/Embedded.d.ts +0 -18
- package/decorators/Embedded.js +0 -18
- package/decorators/Entity.d.ts +0 -18
- package/decorators/Entity.js +0 -13
- package/decorators/Enum.d.ts +0 -9
- package/decorators/Enum.js +0 -16
- package/decorators/Filter.d.ts +0 -2
- package/decorators/Filter.js +0 -8
- package/decorators/Formula.d.ts +0 -5
- package/decorators/Formula.js +0 -15
- package/decorators/Indexed.d.ts +0 -17
- package/decorators/Indexed.js +0 -20
- package/decorators/ManyToMany.d.ts +0 -40
- package/decorators/ManyToMany.js +0 -14
- package/decorators/ManyToOne.d.ts +0 -30
- package/decorators/ManyToOne.js +0 -14
- package/decorators/OneToMany.d.ts +0 -28
- package/decorators/OneToMany.js +0 -17
- package/decorators/OneToOne.d.ts +0 -24
- package/decorators/OneToOne.js +0 -7
- package/decorators/PrimaryKey.d.ts +0 -9
- package/decorators/PrimaryKey.js +0 -20
- package/decorators/Property.d.ts +0 -250
- package/decorators/Property.js +0 -32
- package/decorators/Transactional.d.ts +0 -13
- package/decorators/Transactional.js +0 -28
- package/decorators/hooks.d.ts +0 -16
- package/decorators/hooks.js +0 -47
- package/decorators/index.d.ts +0 -17
- package/decorators/index.js +0 -17
- package/entity/ArrayCollection.d.ts +0 -116
- package/entity/ArrayCollection.js +0 -395
- package/entity/EntityValidator.d.ts +0 -19
- package/entity/EntityValidator.js +0 -150
- package/metadata/ReflectMetadataProvider.d.ts +0 -8
- package/metadata/ReflectMetadataProvider.js +0 -44
- package/utils/resolveContextProvider.d.ts +0 -10
- package/utils/resolveContextProvider.js +0 -28
package/utils/DataloaderUtils.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Collection } from '../entity/Collection.js';
|
|
2
2
|
import { helper } from '../entity/wrap.js';
|
|
3
|
-
import { ReferenceKind } from '../enums.js';
|
|
4
3
|
import { Reference } from '../entity/Reference.js';
|
|
4
|
+
import { Utils } from './Utils.js';
|
|
5
5
|
export class DataloaderUtils {
|
|
6
|
+
static DataLoader;
|
|
6
7
|
/**
|
|
7
8
|
* Groups identified references by entity and returns a Map with the
|
|
8
9
|
* class name as the index and the corresponding primary keys as the value.
|
|
@@ -10,7 +11,7 @@ export class DataloaderUtils {
|
|
|
10
11
|
static groupPrimaryKeysByEntityAndOpts(refsWithOpts) {
|
|
11
12
|
const map = new Map();
|
|
12
13
|
for (const [ref, opts] of refsWithOpts) {
|
|
13
|
-
/* The key is a combination of the
|
|
14
|
+
/* The key is a combination of the uniqueName (a unique table name based identifier) and a stringified version if the load options because we want
|
|
14
15
|
to map each combination of entities/options into separate find queries in order to return accurate results.
|
|
15
16
|
This could be further optimized finding the "lowest common denominator" among the different options
|
|
16
17
|
for each Entity and firing a single query for each Entity instead of Entity+options combination.
|
|
@@ -23,7 +24,7 @@ export class DataloaderUtils {
|
|
|
23
24
|
Thus such approach should probably be configurable, if not opt-in.
|
|
24
25
|
NOTE: meta + opts multi maps (https://github.com/martian17/ds-js) might be a more elegant way
|
|
25
26
|
to implement this but not necessarily faster. */
|
|
26
|
-
const key = `${helper(ref).__meta.
|
|
27
|
+
const key = `${helper(ref).__meta.uniqueName}|${JSON.stringify(opts ?? {})}`;
|
|
27
28
|
let primaryKeysSet = map.get(key);
|
|
28
29
|
if (primaryKeysSet == null) {
|
|
29
30
|
primaryKeysSet = new Set();
|
|
@@ -41,9 +42,10 @@ export class DataloaderUtils {
|
|
|
41
42
|
return async (refsWithOpts) => {
|
|
42
43
|
const groupedIdsMap = DataloaderUtils.groupPrimaryKeysByEntityAndOpts(refsWithOpts);
|
|
43
44
|
const promises = Array.from(groupedIdsMap).map(([key, idsSet]) => {
|
|
44
|
-
const
|
|
45
|
+
const uniqueName = key.substring(0, key.indexOf('|'));
|
|
45
46
|
const opts = JSON.parse(key.substring(key.indexOf('|') + 1));
|
|
46
|
-
|
|
47
|
+
const meta = em.getMetadata().getByUniqueName(uniqueName);
|
|
48
|
+
return em.find(meta.class, Array.from(idsSet), opts);
|
|
47
49
|
});
|
|
48
50
|
await Promise.all(promises);
|
|
49
51
|
/* Instead of assigning each find result to the original reference we use a shortcut
|
|
@@ -69,7 +71,7 @@ export class DataloaderUtils {
|
|
|
69
71
|
The value is another Map which we can use to filter the find query to get results pertaining to the collections that have been dataloaded:
|
|
70
72
|
its keys are the props we are going to filter to and its values are the corresponding PKs.
|
|
71
73
|
*/
|
|
72
|
-
const key = `${col.property.targetMeta.
|
|
74
|
+
const key = `${col.property.targetMeta.uniqueName}|${JSON.stringify(opts ?? {})}`;
|
|
73
75
|
let filterMap = entitiesMap.get(key); // We are going to use this map to filter the entities pertaining to the collections that have been dataloaded.
|
|
74
76
|
if (filterMap == null) {
|
|
75
77
|
filterMap = new Map();
|
|
@@ -96,9 +98,10 @@ export class DataloaderUtils {
|
|
|
96
98
|
*/
|
|
97
99
|
static entitiesAndOptsMapToQueries(entitiesAndOptsMap, em) {
|
|
98
100
|
return Array.from(entitiesAndOptsMap, async ([key, filterMap]) => {
|
|
99
|
-
const
|
|
101
|
+
const uniqueName = key.substring(0, key.indexOf('|'));
|
|
100
102
|
const opts = JSON.parse(key.substring(key.indexOf('|') + 1));
|
|
101
|
-
const
|
|
103
|
+
const meta = em.getMetadata().getByUniqueName(uniqueName);
|
|
104
|
+
const res = await em.find(meta.class, opts?.where != null && Object.keys(opts.where).length > 0 ?
|
|
102
105
|
{
|
|
103
106
|
$and: [
|
|
104
107
|
{
|
|
@@ -118,10 +121,9 @@ export class DataloaderUtils {
|
|
|
118
121
|
// We need to populate the inverse side of the relationship in order to be able to later retrieve the PK(s) from its item(s)
|
|
119
122
|
populate: [
|
|
120
123
|
...(opts.populate === false ? [] : opts.populate ?? []),
|
|
121
|
-
...(opts.ref ? [':ref'] : []),
|
|
122
124
|
...Array.from(filterMap.keys()).filter(
|
|
123
125
|
// We need to do so only if the inverse side is a collection, because we can already retrieve the PK from a reference without having to load it
|
|
124
|
-
prop =>
|
|
126
|
+
prop => meta.properties[prop]?.ref !== true),
|
|
125
127
|
],
|
|
126
128
|
});
|
|
127
129
|
return [key, res];
|
|
@@ -149,15 +151,11 @@ export class DataloaderUtils {
|
|
|
149
151
|
else if (target) {
|
|
150
152
|
return target === collection.owner;
|
|
151
153
|
}
|
|
152
|
-
// FIXME https://github.com/mikro-orm/mikro-orm/issues/6031
|
|
153
|
-
if (!target && collection.property.kind === ReferenceKind.MANY_TO_MANY) {
|
|
154
|
-
throw new Error(`Inverse side is required for M:N relations with dataloader: ${collection.owner.constructor.name}.${collection.property.name}`);
|
|
155
|
-
}
|
|
156
154
|
return false;
|
|
157
155
|
};
|
|
158
156
|
}
|
|
159
157
|
/**
|
|
160
|
-
* Returns the collection dataloader batchLoadFn, which aggregates collections by entity,
|
|
158
|
+
* Returns the 1:M collection dataloader batchLoadFn, which aggregates collections by entity,
|
|
161
159
|
* makes one query per entity and maps each input collection to the corresponding result.
|
|
162
160
|
*/
|
|
163
161
|
static getColBatchLoadFn(em) {
|
|
@@ -168,15 +166,65 @@ export class DataloaderUtils {
|
|
|
168
166
|
// We need to filter the results in order to map each input collection
|
|
169
167
|
// to a subset of each query matching the collection items.
|
|
170
168
|
return collsWithOpts.map(([col, opts]) => {
|
|
171
|
-
const key = `${col.property.targetMeta.
|
|
169
|
+
const key = `${col.property.targetMeta.uniqueName}|${JSON.stringify(opts ?? {})}`;
|
|
172
170
|
const entities = resultsMap.get(key);
|
|
173
171
|
if (entities == null) {
|
|
174
172
|
// Should never happen
|
|
175
|
-
/* v8 ignore next
|
|
173
|
+
/* v8 ignore next */
|
|
176
174
|
throw new Error('Cannot match results');
|
|
177
175
|
}
|
|
178
176
|
return entities.filter(DataloaderUtils.getColFilter(col));
|
|
179
177
|
});
|
|
180
178
|
};
|
|
181
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* Returns the M:N collection dataloader batchLoadFn, which aggregates collections by entity,
|
|
182
|
+
* makes one query per entity and maps each input collection to the corresponding result.
|
|
183
|
+
*/
|
|
184
|
+
static getManyToManyColBatchLoadFn(em) {
|
|
185
|
+
return async (collsWithOpts) => {
|
|
186
|
+
const groups = new Map();
|
|
187
|
+
for (const [col, opts] of collsWithOpts) {
|
|
188
|
+
const key = `${col.property.targetMeta.uniqueName}.${col.property.name}|${JSON.stringify(opts ?? {})}`;
|
|
189
|
+
const value = groups.get(key) ?? [];
|
|
190
|
+
value.push([col, opts ?? {}]);
|
|
191
|
+
groups.set(key, value);
|
|
192
|
+
}
|
|
193
|
+
const ret = [];
|
|
194
|
+
for (const group of groups.values()) {
|
|
195
|
+
const prop = group[0][0].property;
|
|
196
|
+
const options = {};
|
|
197
|
+
const wrap = (cond) => ({ [prop.name]: cond });
|
|
198
|
+
const orderBy = Utils.asArray(group[0][1]?.orderBy).map(o => wrap(o));
|
|
199
|
+
const populate = wrap(group[0][1]?.populate);
|
|
200
|
+
const owners = group.map(c => c[0].owner);
|
|
201
|
+
const $or = [];
|
|
202
|
+
// a bit of a hack, but we need to prefix the key, since we have only a column name, not a property name
|
|
203
|
+
const alias = em.config.getNamingStrategy().aliasName(Utils.className(prop.pivotEntity), 0);
|
|
204
|
+
const fk = `${alias}.${Utils.getPrimaryKeyHash(prop.joinColumns)}`;
|
|
205
|
+
for (const c of group) {
|
|
206
|
+
$or.push({ $and: [c[1]?.where ?? {}, { [fk]: c[0].owner }] });
|
|
207
|
+
options.refresh ??= c[1]?.refresh;
|
|
208
|
+
}
|
|
209
|
+
options.where = wrap({ $or });
|
|
210
|
+
const r = await em.getEntityLoader().findChildrenFromPivotTable(owners, prop, options, orderBy, populate, group[0][1]?.ref);
|
|
211
|
+
ret.push(...r);
|
|
212
|
+
}
|
|
213
|
+
return ret;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
static async getDataLoader() {
|
|
217
|
+
if (this.DataLoader) {
|
|
218
|
+
return this.DataLoader;
|
|
219
|
+
}
|
|
220
|
+
try {
|
|
221
|
+
const mod = await import('dataloader');
|
|
222
|
+
const DataLoader = mod.default;
|
|
223
|
+
return (this.DataLoader ??= DataLoader);
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
/* v8 ignore next */
|
|
227
|
+
throw new Error('DataLoader is not found, make sure `dataloader` package is installed in your project\'s dependencies.');
|
|
228
|
+
}
|
|
229
|
+
}
|
|
182
230
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { EntityData, EntityDictionary, EntityMetadata, EntityProperty, IMetadataStorage } from '../typings.js';
|
|
1
|
+
import type { EntityData, EntityDictionary, EntityMetadata, EntityName, EntityProperty, IMetadataStorage } from '../typings.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
-
type Comparator<T> = (a: T, b: T
|
|
3
|
+
type Comparator<T> = (a: T, b: T, options?: {
|
|
4
|
+
includeInverseSides?: boolean;
|
|
5
|
+
}) => EntityData<T>;
|
|
4
6
|
type ResultMapper<T> = (result: EntityData<T>) => EntityData<T> | null;
|
|
5
7
|
type SnapshotGenerator<T> = (entity: T) => EntityData<T>;
|
|
6
8
|
type CompositeKeyPart = string | CompositeKeyPart[];
|
|
@@ -18,17 +20,19 @@ export declare class EntityComparator {
|
|
|
18
20
|
/**
|
|
19
21
|
* Computes difference between two entities.
|
|
20
22
|
*/
|
|
21
|
-
diffEntities<T>(entityName:
|
|
22
|
-
|
|
23
|
+
diffEntities<T extends object>(entityName: EntityName<T>, a: EntityData<T>, b: EntityData<T>, options?: {
|
|
24
|
+
includeInverseSides?: boolean;
|
|
25
|
+
}): EntityData<T>;
|
|
26
|
+
matching<T extends object>(entityName: EntityName<T>, a: EntityData<T>, b: EntityData<T>): boolean;
|
|
23
27
|
/**
|
|
24
28
|
* Removes ORM specific code from entities and prepares it for serializing. Used before change set computation.
|
|
25
29
|
* References will be mapped to primary keys, collections to arrays of primary keys.
|
|
26
30
|
*/
|
|
27
|
-
prepareEntity<T>(entity: T): EntityData<T>;
|
|
31
|
+
prepareEntity<T extends object>(entity: T): EntityData<T>;
|
|
28
32
|
/**
|
|
29
33
|
* Maps database columns to properties.
|
|
30
34
|
*/
|
|
31
|
-
mapResult<T>(
|
|
35
|
+
mapResult<T>(meta: EntityMetadata<T>, result: EntityDictionary<T>): EntityData<T>;
|
|
32
36
|
/**
|
|
33
37
|
* @internal Highly performance-sensitive method.
|
|
34
38
|
*/
|
|
@@ -44,7 +48,7 @@ export declare class EntityComparator {
|
|
|
44
48
|
/**
|
|
45
49
|
* @internal Highly performance-sensitive method.
|
|
46
50
|
*/
|
|
47
|
-
getSnapshotGenerator<T>(entityName:
|
|
51
|
+
getSnapshotGenerator<T>(entityName: EntityName<T>): SnapshotGenerator<T>;
|
|
48
52
|
/**
|
|
49
53
|
* @internal
|
|
50
54
|
*/
|
|
@@ -60,7 +64,7 @@ export declare class EntityComparator {
|
|
|
60
64
|
/**
|
|
61
65
|
* @internal Highly performance-sensitive method.
|
|
62
66
|
*/
|
|
63
|
-
getResultMapper<T>(
|
|
67
|
+
getResultMapper<T>(meta: EntityMetadata<T>): ResultMapper<T>;
|
|
64
68
|
private getPropertyCondition;
|
|
65
69
|
private getEmbeddedArrayPropertySnapshot;
|
|
66
70
|
/**
|
|
@@ -74,7 +78,7 @@ export declare class EntityComparator {
|
|
|
74
78
|
/**
|
|
75
79
|
* @internal Highly performance-sensitive method.
|
|
76
80
|
*/
|
|
77
|
-
getEntityComparator<T extends object>(entityName:
|
|
81
|
+
getEntityComparator<T extends object>(entityName: EntityName<T>): Comparator<T>;
|
|
78
82
|
private getGenericComparator;
|
|
79
83
|
private getPropertyComparator;
|
|
80
84
|
private wrap;
|