@mikro-orm/core 7.0.0-dev.0 → 7.0.0-dev.2
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 +18 -13
- package/EntityManager.js +202 -202
- package/MikroORM.d.ts +7 -6
- package/MikroORM.js +33 -45
- package/cache/CacheAdapter.js +1 -2
- package/cache/FileCacheAdapter.d.ts +1 -1
- package/cache/FileCacheAdapter.js +18 -26
- package/cache/GeneratedCacheAdapter.d.ts +2 -2
- package/cache/GeneratedCacheAdapter.js +1 -5
- package/cache/MemoryCacheAdapter.d.ts +1 -1
- package/cache/MemoryCacheAdapter.js +1 -5
- package/cache/NullCacheAdapter.d.ts +1 -1
- package/cache/NullCacheAdapter.js +1 -5
- package/cache/index.d.ts +5 -5
- package/cache/index.js +5 -21
- package/connections/Connection.d.ts +7 -7
- package/connections/Connection.js +8 -12
- package/connections/index.d.ts +1 -1
- package/connections/index.js +1 -17
- package/decorators/Check.d.ts +1 -1
- package/decorators/Check.js +5 -8
- package/decorators/CreateRequestContext.d.ts +1 -1
- package/decorators/CreateRequestContext.js +9 -13
- package/decorators/Embeddable.d.ts +1 -1
- package/decorators/Embeddable.js +3 -6
- package/decorators/Embedded.d.ts +1 -1
- package/decorators/Embedded.js +10 -12
- package/decorators/Entity.d.ts +2 -2
- package/decorators/Entity.js +5 -8
- package/decorators/Enum.d.ts +2 -2
- package/decorators/Enum.js +7 -10
- package/decorators/Filter.d.ts +1 -1
- package/decorators/Filter.js +3 -6
- package/decorators/Formula.d.ts +2 -2
- package/decorators/Formula.js +7 -10
- package/decorators/Indexed.d.ts +2 -2
- package/decorators/Indexed.js +6 -10
- package/decorators/ManyToMany.d.ts +3 -3
- package/decorators/ManyToMany.js +10 -12
- package/decorators/ManyToOne.d.ts +3 -3
- package/decorators/ManyToOne.js +10 -12
- package/decorators/OneToMany.d.ts +3 -3
- package/decorators/OneToMany.js +11 -14
- package/decorators/OneToOne.d.ts +4 -4
- package/decorators/OneToOne.js +4 -7
- package/decorators/PrimaryKey.d.ts +2 -2
- package/decorators/PrimaryKey.js +10 -13
- package/decorators/Property.d.ts +5 -5
- package/decorators/Property.js +10 -12
- package/decorators/Transactional.d.ts +2 -2
- package/decorators/Transactional.js +7 -10
- package/decorators/hooks.js +23 -35
- package/decorators/index.d.ts +17 -17
- package/decorators/index.js +17 -36
- package/drivers/DatabaseDriver.d.ts +13 -12
- package/drivers/DatabaseDriver.js +60 -64
- package/drivers/IDatabaseDriver.d.ts +12 -12
- package/drivers/IDatabaseDriver.js +1 -4
- package/drivers/index.d.ts +2 -2
- package/drivers/index.js +2 -18
- package/entity/ArrayCollection.d.ts +2 -2
- package/entity/ArrayCollection.js +29 -33
- package/entity/BaseEntity.d.ts +6 -6
- package/entity/BaseEntity.js +17 -21
- package/entity/Collection.d.ts +6 -6
- package/entity/Collection.js +40 -44
- package/entity/EntityAssigner.d.ts +2 -2
- package/entity/EntityAssigner.js +58 -63
- package/entity/EntityFactory.d.ts +3 -3
- package/entity/EntityFactory.js +58 -62
- package/entity/EntityHelper.d.ts +2 -2
- package/entity/EntityHelper.js +41 -45
- package/entity/EntityIdentifier.d.ts +1 -1
- package/entity/EntityIdentifier.js +1 -5
- package/entity/EntityLoader.d.ts +5 -5
- package/entity/EntityLoader.js +92 -96
- package/entity/EntityRepository.d.ts +7 -7
- package/entity/EntityRepository.js +7 -11
- package/entity/EntityValidator.d.ts +1 -1
- package/entity/EntityValidator.js +25 -29
- package/entity/Reference.d.ts +2 -2
- package/entity/Reference.js +35 -42
- package/entity/WrappedEntity.d.ts +12 -12
- package/entity/WrappedEntity.js +23 -27
- package/entity/index.d.ts +13 -13
- package/entity/index.js +13 -29
- package/entity/utils.d.ts +1 -1
- package/entity/utils.js +9 -12
- package/entity/wrap.d.ts +1 -1
- package/entity/wrap.js +2 -6
- package/enums.d.ts +3 -3
- package/enums.js +37 -41
- package/errors.d.ts +1 -1
- package/errors.js +15 -24
- package/events/EventManager.d.ts +3 -3
- package/events/EventManager.js +8 -12
- package/events/EventSubscriber.d.ts +5 -4
- package/events/EventSubscriber.js +1 -2
- package/events/TransactionEventBroadcaster.d.ts +3 -3
- package/events/TransactionEventBroadcaster.js +1 -5
- package/events/index.d.ts +3 -3
- package/events/index.js +3 -19
- package/exceptions.js +18 -39
- package/hydration/Hydrator.d.ts +5 -5
- package/hydration/Hydrator.js +3 -6
- package/hydration/ObjectHydrator.d.ts +3 -3
- package/hydration/ObjectHydrator.js +25 -28
- package/hydration/index.d.ts +2 -2
- package/hydration/index.js +2 -18
- package/index.d.ts +21 -21
- package/index.js +21 -46
- package/logging/DefaultLogger.d.ts +1 -1
- package/logging/DefaultLogger.js +9 -13
- package/logging/Logger.d.ts +1 -1
- package/logging/Logger.js +1 -2
- package/logging/SimpleLogger.d.ts +2 -2
- package/logging/SimpleLogger.js +2 -6
- package/logging/colors.js +1 -5
- package/logging/index.d.ts +4 -4
- package/logging/index.js +4 -20
- package/metadata/EntitySchema.d.ts +12 -4
- package/metadata/EntitySchema.js +41 -45
- package/metadata/MetadataDiscovery.d.ts +7 -7
- package/metadata/MetadataDiscovery.js +174 -177
- package/metadata/MetadataProvider.d.ts +2 -2
- package/metadata/MetadataProvider.js +4 -7
- package/metadata/MetadataStorage.d.ts +2 -2
- package/metadata/MetadataStorage.js +15 -19
- package/metadata/MetadataValidator.d.ts +4 -4
- package/metadata/MetadataValidator.js +49 -53
- package/metadata/ReflectMetadataProvider.d.ts +2 -2
- package/metadata/ReflectMetadataProvider.js +8 -12
- package/metadata/index.d.ts +6 -6
- package/metadata/index.js +6 -22
- package/naming-strategy/AbstractNamingStrategy.d.ts +2 -2
- package/naming-strategy/AbstractNamingStrategy.js +4 -8
- package/naming-strategy/EntityCaseNamingStrategy.d.ts +1 -1
- package/naming-strategy/EntityCaseNamingStrategy.js +2 -6
- package/naming-strategy/MongoNamingStrategy.d.ts +1 -1
- package/naming-strategy/MongoNamingStrategy.js +2 -6
- package/naming-strategy/NamingStrategy.d.ts +1 -1
- package/naming-strategy/NamingStrategy.js +1 -2
- package/naming-strategy/UnderscoreNamingStrategy.d.ts +1 -1
- package/naming-strategy/UnderscoreNamingStrategy.js +2 -6
- package/naming-strategy/index.d.ts +5 -5
- package/naming-strategy/index.js +5 -21
- package/package.json +5 -14
- package/platforms/ExceptionConverter.d.ts +2 -2
- package/platforms/ExceptionConverter.js +4 -8
- package/platforms/Platform.d.ts +10 -10
- package/platforms/Platform.js +57 -61
- package/platforms/index.d.ts +2 -2
- package/platforms/index.js +2 -18
- package/serialization/EntitySerializer.d.ts +2 -2
- package/serialization/EntitySerializer.js +36 -41
- package/serialization/EntityTransformer.d.ts +1 -1
- package/serialization/EntityTransformer.js +27 -31
- package/serialization/SerializationContext.d.ts +2 -2
- package/serialization/SerializationContext.js +10 -14
- package/serialization/index.d.ts +3 -3
- package/serialization/index.js +3 -19
- package/types/ArrayType.d.ts +3 -3
- package/types/ArrayType.js +7 -11
- package/types/BigIntType.d.ts +3 -3
- package/types/BigIntType.js +3 -6
- package/types/BlobType.d.ts +3 -3
- package/types/BlobType.js +2 -8
- package/types/BooleanType.d.ts +3 -3
- package/types/BooleanType.js +2 -6
- package/types/CharacterType.d.ts +3 -3
- package/types/CharacterType.js +2 -6
- package/types/DateTimeType.d.ts +3 -3
- package/types/DateTimeType.js +2 -6
- package/types/DateType.d.ts +3 -3
- package/types/DateType.js +2 -6
- package/types/DecimalType.d.ts +3 -3
- package/types/DecimalType.js +4 -7
- package/types/DoubleType.d.ts +3 -3
- package/types/DoubleType.js +3 -6
- package/types/EnumArrayType.d.ts +4 -4
- package/types/EnumArrayType.js +5 -10
- package/types/EnumType.d.ts +3 -3
- package/types/EnumType.js +2 -6
- package/types/FloatType.d.ts +3 -3
- package/types/FloatType.js +2 -6
- package/types/IntegerType.d.ts +3 -3
- package/types/IntegerType.js +2 -6
- package/types/IntervalType.d.ts +3 -3
- package/types/IntervalType.js +2 -6
- package/types/JsonType.d.ts +3 -3
- package/types/JsonType.js +2 -6
- package/types/MediumIntType.d.ts +3 -3
- package/types/MediumIntType.js +2 -6
- package/types/SmallIntType.d.ts +3 -3
- package/types/SmallIntType.js +2 -6
- package/types/StringType.d.ts +3 -3
- package/types/StringType.js +2 -6
- package/types/TextType.d.ts +3 -3
- package/types/TextType.js +2 -6
- package/types/TimeType.d.ts +3 -3
- package/types/TimeType.js +4 -8
- package/types/TinyIntType.d.ts +3 -3
- package/types/TinyIntType.js +3 -6
- package/types/Type.d.ts +2 -2
- package/types/Type.js +5 -9
- package/types/Uint8ArrayType.d.ts +3 -3
- package/types/Uint8ArrayType.js +3 -9
- package/types/UnknownType.d.ts +3 -3
- package/types/UnknownType.js +2 -6
- package/types/UuidType.d.ts +3 -3
- package/types/UuidType.js +2 -6
- package/types/index.d.ts +25 -25
- package/types/index.js +52 -79
- package/typings.d.ts +22 -20
- package/typings.js +34 -38
- package/unit-of-work/ChangeSet.d.ts +1 -1
- package/unit-of-work/ChangeSet.js +13 -17
- package/unit-of-work/ChangeSetComputer.d.ts +8 -7
- package/unit-of-work/ChangeSetComputer.js +26 -30
- package/unit-of-work/ChangeSetPersister.d.ts +7 -6
- package/unit-of-work/ChangeSetPersister.js +44 -47
- package/unit-of-work/CommitOrderCalculator.d.ts +1 -1
- package/unit-of-work/CommitOrderCalculator.js +6 -10
- package/unit-of-work/IdentityMap.d.ts +1 -1
- package/unit-of-work/IdentityMap.js +1 -5
- package/unit-of-work/UnitOfWork.d.ts +8 -7
- package/unit-of-work/UnitOfWork.js +171 -172
- package/unit-of-work/index.d.ts +6 -6
- package/unit-of-work/index.js +6 -22
- package/utils/AbstractSchemaGenerator.d.ts +6 -6
- package/utils/AbstractSchemaGenerator.js +7 -11
- package/utils/Configuration.d.ts +26 -27
- package/utils/Configuration.js +50 -55
- package/utils/ConfigurationLoader.d.ts +9 -8
- package/utils/ConfigurationLoader.js +71 -86
- package/utils/Cursor.d.ts +3 -3
- package/utils/Cursor.js +22 -25
- package/utils/DataloaderUtils.d.ts +4 -4
- package/utils/DataloaderUtils.js +12 -16
- package/utils/EntityComparator.d.ts +2 -2
- package/utils/EntityComparator.js +48 -52
- package/utils/NullHighlighter.d.ts +1 -1
- package/utils/NullHighlighter.js +1 -5
- package/utils/QueryHelper.d.ts +3 -3
- package/utils/QueryHelper.js +47 -51
- package/utils/RawQueryFragment.d.ts +1 -1
- package/utils/RawQueryFragment.js +16 -24
- package/utils/RequestContext.d.ts +2 -2
- package/utils/RequestContext.js +3 -7
- package/utils/TransactionContext.d.ts +1 -1
- package/utils/TransactionContext.js +4 -8
- package/utils/Utils.d.ts +16 -12
- package/utils/Utils.js +89 -93
- package/utils/clone.js +8 -11
- package/utils/index.d.ts +13 -13
- package/utils/index.js +13 -29
- package/utils/resolveContextProvider.d.ts +3 -3
- package/utils/resolveContextProvider.js +9 -12
- package/utils/upsert-utils.d.ts +3 -3
- package/utils/upsert-utils.js +5 -9
- package/index.mjs +0 -199
package/types/index.js
CHANGED
|
@@ -1,80 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const UuidType_1 = require("./UuidType");
|
|
53
|
-
Object.defineProperty(exports, "UuidType", { enumerable: true, get: function () { return UuidType_1.UuidType; } });
|
|
54
|
-
exports.types = {
|
|
55
|
-
date: DateType_1.DateType,
|
|
56
|
-
time: TimeType_1.TimeType,
|
|
57
|
-
datetime: DateTimeType_1.DateTimeType,
|
|
58
|
-
bigint: BigIntType_1.BigIntType,
|
|
59
|
-
blob: BlobType_1.BlobType,
|
|
60
|
-
uint8array: Uint8ArrayType_1.Uint8ArrayType,
|
|
61
|
-
array: ArrayType_1.ArrayType,
|
|
62
|
-
enumArray: EnumArrayType_1.EnumArrayType,
|
|
63
|
-
enum: EnumType_1.EnumType,
|
|
64
|
-
json: JsonType_1.JsonType,
|
|
65
|
-
integer: IntegerType_1.IntegerType,
|
|
66
|
-
smallint: SmallIntType_1.SmallIntType,
|
|
67
|
-
tinyint: TinyIntType_1.TinyIntType,
|
|
68
|
-
mediumint: MediumIntType_1.MediumIntType,
|
|
69
|
-
float: FloatType_1.FloatType,
|
|
70
|
-
double: DoubleType_1.DoubleType,
|
|
71
|
-
boolean: BooleanType_1.BooleanType,
|
|
72
|
-
decimal: DecimalType_1.DecimalType,
|
|
73
|
-
character: CharacterType_1.CharacterType,
|
|
74
|
-
string: StringType_1.StringType,
|
|
75
|
-
uuid: UuidType_1.UuidType,
|
|
76
|
-
text: TextType_1.TextType,
|
|
77
|
-
interval: IntervalType_1.IntervalType,
|
|
78
|
-
unknown: UnknownType_1.UnknownType,
|
|
1
|
+
import { ArrayType } from './ArrayType.js';
|
|
2
|
+
import { BigIntType } from './BigIntType.js';
|
|
3
|
+
import { BlobType } from './BlobType.js';
|
|
4
|
+
import { BooleanType } from './BooleanType.js';
|
|
5
|
+
import { DateTimeType } from './DateTimeType.js';
|
|
6
|
+
import { DateType } from './DateType.js';
|
|
7
|
+
import { DecimalType } from './DecimalType.js';
|
|
8
|
+
import { DoubleType } from './DoubleType.js';
|
|
9
|
+
import { EnumArrayType } from './EnumArrayType.js';
|
|
10
|
+
import { EnumType } from './EnumType.js';
|
|
11
|
+
import { CharacterType } from './CharacterType.js';
|
|
12
|
+
import { FloatType } from './FloatType.js';
|
|
13
|
+
import { IntegerType } from './IntegerType.js';
|
|
14
|
+
import { IntervalType } from './IntervalType.js';
|
|
15
|
+
import { JsonType } from './JsonType.js';
|
|
16
|
+
import { MediumIntType } from './MediumIntType.js';
|
|
17
|
+
import { SmallIntType } from './SmallIntType.js';
|
|
18
|
+
import { StringType } from './StringType.js';
|
|
19
|
+
import { TextType } from './TextType.js';
|
|
20
|
+
import { TimeType } from './TimeType.js';
|
|
21
|
+
import { TinyIntType } from './TinyIntType.js';
|
|
22
|
+
import { Type } from './Type.js';
|
|
23
|
+
import { Uint8ArrayType } from './Uint8ArrayType.js';
|
|
24
|
+
import { UnknownType } from './UnknownType.js';
|
|
25
|
+
import { UuidType } from './UuidType.js';
|
|
26
|
+
export { Type, DateType, TimeType, DateTimeType, BigIntType, BlobType, Uint8ArrayType, ArrayType, EnumArrayType, EnumType, JsonType, IntegerType, SmallIntType, TinyIntType, MediumIntType, FloatType, DoubleType, BooleanType, DecimalType, StringType, UuidType, TextType, UnknownType, IntervalType, CharacterType, };
|
|
27
|
+
export const types = {
|
|
28
|
+
date: DateType,
|
|
29
|
+
time: TimeType,
|
|
30
|
+
datetime: DateTimeType,
|
|
31
|
+
bigint: BigIntType,
|
|
32
|
+
blob: BlobType,
|
|
33
|
+
uint8array: Uint8ArrayType,
|
|
34
|
+
array: ArrayType,
|
|
35
|
+
enumArray: EnumArrayType,
|
|
36
|
+
enum: EnumType,
|
|
37
|
+
json: JsonType,
|
|
38
|
+
integer: IntegerType,
|
|
39
|
+
smallint: SmallIntType,
|
|
40
|
+
tinyint: TinyIntType,
|
|
41
|
+
mediumint: MediumIntType,
|
|
42
|
+
float: FloatType,
|
|
43
|
+
double: DoubleType,
|
|
44
|
+
boolean: BooleanType,
|
|
45
|
+
decimal: DecimalType,
|
|
46
|
+
character: CharacterType,
|
|
47
|
+
string: StringType,
|
|
48
|
+
uuid: UuidType,
|
|
49
|
+
text: TextType,
|
|
50
|
+
interval: IntervalType,
|
|
51
|
+
unknown: UnknownType,
|
|
79
52
|
};
|
|
80
|
-
|
|
53
|
+
export const t = types;
|
package/typings.d.ts
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import type { Transaction } from './connections';
|
|
2
|
-
import { type Cascade, type DeferMode, type EventType, type LoadStrategy, type PopulatePath, type QueryOrderMap, ReferenceKind } from './enums';
|
|
3
|
-
import { type AssignOptions } from './entity/EntityAssigner';
|
|
4
|
-
import { type EntityIdentifier } from './entity/EntityIdentifier';
|
|
5
|
-
import { type EntityLoaderOptions } from './entity/EntityLoader';
|
|
6
|
-
import { type Collection } from './entity/Collection';
|
|
7
|
-
import { type EntityFactory } from './entity/EntityFactory';
|
|
8
|
-
import { type EntityRepository } from './entity/EntityRepository';
|
|
9
|
-
import { Reference, type ScalarReference } from './entity/Reference';
|
|
10
|
-
import type { MikroORM } from './MikroORM';
|
|
11
|
-
import type { SerializationContext
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
19
|
-
import type {
|
|
1
|
+
import type { Transaction } from './connections/Connection.js';
|
|
2
|
+
import { type Cascade, type DeferMode, type EventType, type LoadStrategy, type PopulatePath, type QueryOrderMap, ReferenceKind } from './enums.js';
|
|
3
|
+
import { type AssignOptions } from './entity/EntityAssigner.js';
|
|
4
|
+
import { type EntityIdentifier } from './entity/EntityIdentifier.js';
|
|
5
|
+
import { type EntityLoaderOptions } from './entity/EntityLoader.js';
|
|
6
|
+
import { type Collection } from './entity/Collection.js';
|
|
7
|
+
import { type EntityFactory } from './entity/EntityFactory.js';
|
|
8
|
+
import { type EntityRepository } from './entity/EntityRepository.js';
|
|
9
|
+
import { Reference, type ScalarReference } from './entity/Reference.js';
|
|
10
|
+
import type { MikroORM } from './MikroORM.js';
|
|
11
|
+
import type { SerializationContext } from './serialization/SerializationContext.js';
|
|
12
|
+
import type { SerializeOptions } from './serialization/EntitySerializer.js';
|
|
13
|
+
import type { MetadataStorage } from './metadata/MetadataStorage.js';
|
|
14
|
+
import type { EntitySchema } from './metadata/EntitySchema.js';
|
|
15
|
+
import type { Type, types } from './types/index.js';
|
|
16
|
+
import type { Platform } from './platforms/Platform.js';
|
|
17
|
+
import type { Configuration } from './utils/Configuration.js';
|
|
18
|
+
import type { RawQueryFragment } from './utils/RawQueryFragment.js';
|
|
19
|
+
import type { EntityManager } from './EntityManager.js';
|
|
20
|
+
import type { EmbeddedPrefixMode } from './decorators/Embedded.js';
|
|
21
|
+
import type { EventSubscriber } from './events/EventSubscriber.js';
|
|
22
|
+
import type { FindOneOptions, FindOptions, LoadHint } from './drivers/IDatabaseDriver.js';
|
|
20
23
|
export type Constructor<T = unknown> = new (...args: any[]) => T;
|
|
21
24
|
export type Dictionary<T = any> = {
|
|
22
25
|
[k: string]: T;
|
|
@@ -468,7 +471,6 @@ export interface EntityMetadata<T = any> {
|
|
|
468
471
|
prototype: T;
|
|
469
472
|
class: EntityClass<T>;
|
|
470
473
|
abstract: boolean;
|
|
471
|
-
useCache: boolean;
|
|
472
474
|
filters: Dictionary<FilterDef>;
|
|
473
475
|
comment?: string;
|
|
474
476
|
selfReferencing?: boolean;
|
package/typings.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.HiddenProps = Symbol('HiddenProps');
|
|
14
|
-
exports.Config = Symbol('Config');
|
|
15
|
-
class EntityMetadata {
|
|
1
|
+
import { ReferenceKind, } from './enums.js';
|
|
2
|
+
import { Reference } from './entity/Reference.js';
|
|
3
|
+
import { EntityHelper } from './entity/EntityHelper.js';
|
|
4
|
+
import { Utils } from './utils/Utils.js';
|
|
5
|
+
import { EntityComparator } from './utils/EntityComparator.js';
|
|
6
|
+
export const EntityRepositoryType = Symbol('EntityRepositoryType');
|
|
7
|
+
export const PrimaryKeyProp = Symbol('PrimaryKeyProp');
|
|
8
|
+
export const OptionalProps = Symbol('OptionalProps');
|
|
9
|
+
export const EagerProps = Symbol('EagerProps');
|
|
10
|
+
export const HiddenProps = Symbol('HiddenProps');
|
|
11
|
+
export const Config = Symbol('Config');
|
|
12
|
+
export class EntityMetadata {
|
|
16
13
|
static counter = 0;
|
|
17
14
|
_id = 1000 * EntityMetadata.counter++; // keep the id >= 1000 to allow computing cache keys by simple addition
|
|
18
15
|
propertyOrder = new Map();
|
|
@@ -35,7 +32,7 @@ class EntityMetadata {
|
|
|
35
32
|
}
|
|
36
33
|
this.properties[prop.name] = prop;
|
|
37
34
|
this.propertyOrder.set(prop.name, this.props.length);
|
|
38
|
-
/*
|
|
35
|
+
/* v8 ignore next 3 */
|
|
39
36
|
if (sync) {
|
|
40
37
|
this.sync();
|
|
41
38
|
}
|
|
@@ -43,7 +40,7 @@ class EntityMetadata {
|
|
|
43
40
|
removeProperty(name, sync = true) {
|
|
44
41
|
delete this.properties[name];
|
|
45
42
|
this.propertyOrder.delete(name);
|
|
46
|
-
/*
|
|
43
|
+
/* v8 ignore next 3 */
|
|
47
44
|
if (sync) {
|
|
48
45
|
this.sync();
|
|
49
46
|
}
|
|
@@ -64,11 +61,11 @@ class EntityMetadata {
|
|
|
64
61
|
this.root ??= this;
|
|
65
62
|
const props = Object.values(this.properties).sort((a, b) => this.propertyOrder.get(a.name) - this.propertyOrder.get(b.name));
|
|
66
63
|
this.props = [...props.filter(p => p.primary), ...props.filter(p => !p.primary)];
|
|
67
|
-
this.relations = this.props.filter(prop => typeof prop.kind !== 'undefined' && prop.kind !==
|
|
64
|
+
this.relations = this.props.filter(prop => typeof prop.kind !== 'undefined' && prop.kind !== ReferenceKind.SCALAR && prop.kind !== ReferenceKind.EMBEDDED);
|
|
68
65
|
this.bidirectionalRelations = this.relations.filter(prop => prop.mappedBy || prop.inversedBy);
|
|
69
66
|
this.uniqueProps = this.props.filter(prop => prop.unique);
|
|
70
67
|
this.getterProps = this.props.filter(prop => prop.getter);
|
|
71
|
-
this.comparableProps = this.props.filter(prop =>
|
|
68
|
+
this.comparableProps = this.props.filter(prop => EntityComparator.isComparable(prop, this));
|
|
72
69
|
this.hydrateProps = this.props.filter(prop => {
|
|
73
70
|
// `prop.userDefined` is either `undefined` or `false`
|
|
74
71
|
const discriminator = this.root.discriminatorColumn === prop.name && prop.userDefined === false;
|
|
@@ -78,14 +75,14 @@ class EntityMetadata {
|
|
|
78
75
|
});
|
|
79
76
|
this.trackingProps = this.hydrateProps
|
|
80
77
|
.filter(prop => !prop.getter && !prop.setter && prop.trackChanges !== false)
|
|
81
|
-
.filter(prop => ![
|
|
78
|
+
.filter(prop => ![ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind))
|
|
82
79
|
.filter(prop => !prop.serializedPrimaryKey);
|
|
83
80
|
this.selfReferencing = this.relations.some(prop => [this.className, this.root.className].includes(prop.targetMeta?.root.className ?? prop.type));
|
|
84
81
|
this.hasUniqueProps = this.uniques.length + this.uniqueProps.length > 0;
|
|
85
82
|
this.virtual = !!this.expression;
|
|
86
83
|
if (config) {
|
|
87
84
|
for (const prop of this.props) {
|
|
88
|
-
if (prop.enum && !prop.nativeEnumName && prop.items?.every(item =>
|
|
85
|
+
if (prop.enum && !prop.nativeEnumName && prop.items?.every(item => Utils.isString(item))) {
|
|
89
86
|
const name = config.getNamingStrategy().indexName(this.tableName, prop.fieldNames, 'check');
|
|
90
87
|
const exists = this.checks.findIndex(check => check.name === name);
|
|
91
88
|
if (exists !== -1) {
|
|
@@ -99,11 +96,11 @@ class EntityMetadata {
|
|
|
99
96
|
}
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
|
-
this.checks =
|
|
103
|
-
this.indexes =
|
|
104
|
-
this.uniques =
|
|
105
|
-
for (const hook of
|
|
106
|
-
this.hooks[hook] =
|
|
99
|
+
this.checks = Utils.removeDuplicates(this.checks);
|
|
100
|
+
this.indexes = Utils.removeDuplicates(this.indexes);
|
|
101
|
+
this.uniques = Utils.removeDuplicates(this.uniques);
|
|
102
|
+
for (const hook of Utils.keys(this.hooks)) {
|
|
103
|
+
this.hooks[hook] = Utils.removeDuplicates(this.hooks[hook]);
|
|
107
104
|
}
|
|
108
105
|
if (this.virtual) {
|
|
109
106
|
this.readonly = true;
|
|
@@ -112,8 +109,8 @@ class EntityMetadata {
|
|
|
112
109
|
this.props.forEach(prop => this.initIndexes(prop));
|
|
113
110
|
}
|
|
114
111
|
this.definedProperties = this.trackingProps.reduce((o, prop) => {
|
|
115
|
-
const isCollection = [
|
|
116
|
-
const isReference = [
|
|
112
|
+
const isCollection = [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind);
|
|
113
|
+
const isReference = [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind) && (prop.inversedBy || prop.mappedBy) && !prop.mapToPk;
|
|
117
114
|
if (isReference) {
|
|
118
115
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
119
116
|
const meta = this;
|
|
@@ -124,17 +121,17 @@ class EntityMetadata {
|
|
|
124
121
|
set(val) {
|
|
125
122
|
const wrapped = this.__helper;
|
|
126
123
|
const hydrator = wrapped.hydrator;
|
|
127
|
-
const entity =
|
|
128
|
-
const old =
|
|
129
|
-
wrapped.__data[prop.name] =
|
|
124
|
+
const entity = Reference.unwrapReference(val ?? wrapped.__data[prop.name]);
|
|
125
|
+
const old = Reference.unwrapReference(wrapped.__data[prop.name]);
|
|
126
|
+
wrapped.__data[prop.name] = Reference.wrapReference(val, prop);
|
|
130
127
|
// when propagation from inside hydration, we set the FK to the entity data immediately
|
|
131
128
|
if (val && hydrator.isRunning() && wrapped.__originalEntityData && prop.owner) {
|
|
132
|
-
wrapped.__originalEntityData[prop.name] =
|
|
129
|
+
wrapped.__originalEntityData[prop.name] = Utils.getPrimaryKeyValues(val, prop.targetMeta.primaryKeys, true);
|
|
133
130
|
}
|
|
134
131
|
else {
|
|
135
132
|
wrapped.__touched = !hydrator.isRunning();
|
|
136
133
|
}
|
|
137
|
-
|
|
134
|
+
EntityHelper.propagate(meta, entity, this, prop, Reference.unwrapReference(val), old);
|
|
138
135
|
},
|
|
139
136
|
enumerable: true,
|
|
140
137
|
configurable: true,
|
|
@@ -163,14 +160,14 @@ class EntityMetadata {
|
|
|
163
160
|
initIndexes(prop) {
|
|
164
161
|
const simpleIndex = this.indexes.find(index => index.properties === prop.name && !index.options && !index.type && !index.expression);
|
|
165
162
|
const simpleUnique = this.uniques.find(index => index.properties === prop.name && !index.options);
|
|
166
|
-
const owner = prop.kind ===
|
|
163
|
+
const owner = prop.kind === ReferenceKind.MANY_TO_ONE;
|
|
167
164
|
if (!prop.index && simpleIndex) {
|
|
168
|
-
|
|
165
|
+
Utils.defaultValue(simpleIndex, 'name', true);
|
|
169
166
|
prop.index = simpleIndex.name;
|
|
170
167
|
this.indexes.splice(this.indexes.indexOf(simpleIndex), 1);
|
|
171
168
|
}
|
|
172
169
|
if (!prop.unique && simpleUnique) {
|
|
173
|
-
|
|
170
|
+
Utils.defaultValue(simpleUnique, 'name', true);
|
|
174
171
|
prop.unique = simpleUnique.name;
|
|
175
172
|
this.uniques.splice(this.uniques.indexOf(simpleUnique), 1);
|
|
176
173
|
}
|
|
@@ -178,7 +175,7 @@ class EntityMetadata {
|
|
|
178
175
|
this.indexes.push({ properties: prop.name });
|
|
179
176
|
prop.index = false;
|
|
180
177
|
}
|
|
181
|
-
/*
|
|
178
|
+
/* v8 ignore next 4 */
|
|
182
179
|
if (owner && prop.fieldNames.length > 1 && prop.unique) {
|
|
183
180
|
this.uniques.push({ properties: prop.name });
|
|
184
181
|
prop.unique = false;
|
|
@@ -189,4 +186,3 @@ class EntityMetadata {
|
|
|
189
186
|
return this;
|
|
190
187
|
}
|
|
191
188
|
}
|
|
192
|
-
exports.EntityMetadata = EntityMetadata;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
|
-
import type { EntityData, EntityMetadata, EntityDictionary, Primary } from '../typings';
|
|
2
|
+
import type { EntityData, EntityMetadata, EntityDictionary, Primary } from '../typings.js';
|
|
3
3
|
export declare class ChangeSet<T extends object> {
|
|
4
4
|
entity: T;
|
|
5
5
|
type: ChangeSetType;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const wrap_1 = require("../entity/wrap");
|
|
6
|
-
const Utils_1 = require("../utils/Utils");
|
|
7
|
-
class ChangeSet {
|
|
1
|
+
import { inspect } from 'node:util';
|
|
2
|
+
import { helper } from '../entity/wrap.js';
|
|
3
|
+
import { Utils } from '../utils/Utils.js';
|
|
4
|
+
export class ChangeSet {
|
|
8
5
|
entity;
|
|
9
6
|
type;
|
|
10
7
|
payload;
|
|
@@ -19,11 +16,11 @@ class ChangeSet {
|
|
|
19
16
|
this.name = meta.className;
|
|
20
17
|
this.rootName = meta.root.className;
|
|
21
18
|
this.collection = meta.root.collection;
|
|
22
|
-
this.schema =
|
|
19
|
+
this.schema = helper(entity).__schema ?? meta.root.schema;
|
|
23
20
|
}
|
|
24
21
|
getPrimaryKey(object = false) {
|
|
25
22
|
if (!this.originalEntity) {
|
|
26
|
-
this.primaryKey ??=
|
|
23
|
+
this.primaryKey ??= helper(this.entity).getPrimaryKey(true);
|
|
27
24
|
}
|
|
28
25
|
else if (this.meta.compositePK) {
|
|
29
26
|
this.primaryKey = this.meta.primaryKeys.map(pk => this.originalEntity[pk]);
|
|
@@ -40,31 +37,30 @@ class ChangeSet {
|
|
|
40
37
|
});
|
|
41
38
|
}
|
|
42
39
|
if (object && this.primaryKey != null) {
|
|
43
|
-
return
|
|
40
|
+
return Utils.primaryKeyToObject(this.meta, this.primaryKey);
|
|
44
41
|
}
|
|
45
42
|
return this.primaryKey ?? null;
|
|
46
43
|
}
|
|
47
44
|
getSerializedPrimaryKey() {
|
|
48
|
-
this.serializedPrimaryKey ??=
|
|
45
|
+
this.serializedPrimaryKey ??= helper(this.entity).getSerializedPrimaryKey();
|
|
49
46
|
return this.serializedPrimaryKey;
|
|
50
47
|
}
|
|
51
48
|
/** @ignore */
|
|
52
|
-
[
|
|
49
|
+
[inspect.custom](depth = 2) {
|
|
53
50
|
const object = { ...this };
|
|
54
51
|
const hidden = ['meta', 'serializedPrimaryKey'];
|
|
55
52
|
hidden.forEach(k => delete object[k]);
|
|
56
|
-
const ret =
|
|
53
|
+
const ret = inspect(object, { depth });
|
|
57
54
|
const name = `${this.constructor.name}<${this.meta.className}>`;
|
|
58
|
-
/*
|
|
55
|
+
/* v8 ignore next */
|
|
59
56
|
return ret === '[Object]' ? `[${name}]` : name + ' ' + ret;
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
|
-
|
|
63
|
-
var ChangeSetType;
|
|
59
|
+
export var ChangeSetType;
|
|
64
60
|
(function (ChangeSetType) {
|
|
65
61
|
ChangeSetType["CREATE"] = "create";
|
|
66
62
|
ChangeSetType["UPDATE"] = "update";
|
|
67
63
|
ChangeSetType["DELETE"] = "delete";
|
|
68
64
|
ChangeSetType["UPDATE_EARLY"] = "update_early";
|
|
69
65
|
ChangeSetType["DELETE_EARLY"] = "delete_early";
|
|
70
|
-
})(ChangeSetType || (
|
|
66
|
+
})(ChangeSetType || (ChangeSetType = {}));
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type Configuration } from '../utils/Configuration';
|
|
2
|
-
import type { MetadataStorage } from '../metadata';
|
|
3
|
-
import type { AnyEntity } from '../typings';
|
|
4
|
-
import { ChangeSet } from './ChangeSet';
|
|
5
|
-
import { type
|
|
6
|
-
import type
|
|
7
|
-
import type {
|
|
1
|
+
import { type Configuration } from '../utils/Configuration.js';
|
|
2
|
+
import type { MetadataStorage } from '../metadata/MetadataStorage.js';
|
|
3
|
+
import type { AnyEntity } from '../typings.js';
|
|
4
|
+
import { ChangeSet } from './ChangeSet.js';
|
|
5
|
+
import { type EntityValidator } from '../entity/EntityValidator.js';
|
|
6
|
+
import { type Collection } from '../entity/Collection.js';
|
|
7
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
8
|
+
import type { EntityManager } from '../EntityManager.js';
|
|
8
9
|
export declare class ChangeSetComputer {
|
|
9
10
|
private readonly validator;
|
|
10
11
|
private readonly collectionUpdates;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const entity_1 = require("../entity");
|
|
7
|
-
const enums_1 = require("../enums");
|
|
8
|
-
class ChangeSetComputer {
|
|
1
|
+
import { Utils } from '../utils/Utils.js';
|
|
2
|
+
import { ChangeSet, ChangeSetType } from './ChangeSet.js';
|
|
3
|
+
import { helper } from '../entity/wrap.js';
|
|
4
|
+
import { ReferenceKind } from '../enums.js';
|
|
5
|
+
export class ChangeSetComputer {
|
|
9
6
|
validator;
|
|
10
7
|
collectionUpdates;
|
|
11
8
|
metadata;
|
|
@@ -27,20 +24,20 @@ class ChangeSetComputer {
|
|
|
27
24
|
if (meta.readonly) {
|
|
28
25
|
return null;
|
|
29
26
|
}
|
|
30
|
-
const wrapped =
|
|
31
|
-
const type = wrapped.__originalEntityData ?
|
|
27
|
+
const wrapped = helper(entity);
|
|
28
|
+
const type = wrapped.__originalEntityData ? ChangeSetType.UPDATE : ChangeSetType.CREATE;
|
|
32
29
|
const map = new Map();
|
|
33
30
|
// Execute `onCreate` and `onUpdate` on properties recursively, saves `onUpdate` results
|
|
34
31
|
// to the `map` as we want to apply those only if something else changed.
|
|
35
|
-
if (type ===
|
|
32
|
+
if (type === ChangeSetType.CREATE) { // run update hooks only after we know there are other changes
|
|
36
33
|
for (const prop of meta.hydrateProps) {
|
|
37
34
|
this.processPropertyInitializers(entity, prop, type, map);
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
|
-
if (type ===
|
|
37
|
+
if (type === ChangeSetType.UPDATE && !wrapped.__initialized && !wrapped.isTouched()) {
|
|
41
38
|
return null;
|
|
42
39
|
}
|
|
43
|
-
const changeSet = new
|
|
40
|
+
const changeSet = new ChangeSet(entity, type, this.computePayload(entity), meta);
|
|
44
41
|
changeSet.originalEntity = wrapped.__originalEntityData;
|
|
45
42
|
if (this.config.get('validate')) {
|
|
46
43
|
this.validator.validate(changeSet.entity, changeSet.payload, meta);
|
|
@@ -48,12 +45,12 @@ class ChangeSetComputer {
|
|
|
48
45
|
for (const prop of meta.relations.filter(prop => prop.persist !== false || prop.userDefined === false)) {
|
|
49
46
|
this.processProperty(changeSet, prop);
|
|
50
47
|
}
|
|
51
|
-
if (changeSet.type ===
|
|
48
|
+
if (changeSet.type === ChangeSetType.UPDATE && !Utils.hasObjectKeys(changeSet.payload)) {
|
|
52
49
|
return null;
|
|
53
50
|
}
|
|
54
51
|
// Execute `onCreate` and `onUpdate` on properties recursively, saves `onUpdate` results
|
|
55
52
|
// to the `map` as we want to apply those only if something else changed.
|
|
56
|
-
if (type ===
|
|
53
|
+
if (type === ChangeSetType.UPDATE) {
|
|
57
54
|
for (const prop of meta.hydrateProps) {
|
|
58
55
|
this.processPropertyInitializers(entity, prop, type, map);
|
|
59
56
|
}
|
|
@@ -66,7 +63,7 @@ class ChangeSetComputer {
|
|
|
66
63
|
}
|
|
67
64
|
// Recompute the changeset, we need to merge this as here we ignore relations.
|
|
68
65
|
const diff = this.computePayload(entity, true);
|
|
69
|
-
|
|
66
|
+
Utils.merge(changeSet.payload, diff);
|
|
70
67
|
}
|
|
71
68
|
return changeSet;
|
|
72
69
|
}
|
|
@@ -75,17 +72,17 @@ class ChangeSetComputer {
|
|
|
75
72
|
*/
|
|
76
73
|
processPropertyInitializers(entity, prop, type, map, nested) {
|
|
77
74
|
if (prop.onCreate
|
|
78
|
-
&& type ===
|
|
75
|
+
&& type === ChangeSetType.CREATE
|
|
79
76
|
&& (entity[prop.name] == null
|
|
80
|
-
|| (
|
|
77
|
+
|| (Utils.isScalarReference(entity[prop.name]) && entity[prop.name].unwrap() == null))) {
|
|
81
78
|
entity[prop.name] = prop.onCreate(entity, this.em);
|
|
82
79
|
}
|
|
83
|
-
if (prop.onUpdate && type ===
|
|
80
|
+
if (prop.onUpdate && type === ChangeSetType.UPDATE) {
|
|
84
81
|
const pairs = map.get(entity) ?? [];
|
|
85
82
|
pairs.push([prop.name, prop.onUpdate(entity, this.em)]);
|
|
86
83
|
map.set(entity, pairs);
|
|
87
84
|
}
|
|
88
|
-
if (prop.kind ===
|
|
85
|
+
if (prop.kind === ReferenceKind.EMBEDDED && entity[prop.name]) {
|
|
89
86
|
for (const embeddedProp of prop.targetMeta.hydrateProps) {
|
|
90
87
|
this.processPropertyInitializers(entity[prop.name], embeddedProp, type, map, nested || prop.object);
|
|
91
88
|
}
|
|
@@ -93,7 +90,7 @@ class ChangeSetComputer {
|
|
|
93
90
|
}
|
|
94
91
|
computePayload(entity, ignoreUndefined = false) {
|
|
95
92
|
const data = this.comparator.prepareEntity(entity);
|
|
96
|
-
const wrapped =
|
|
93
|
+
const wrapped = helper(entity);
|
|
97
94
|
const entityName = wrapped.__meta.className;
|
|
98
95
|
const originalEntityData = wrapped.__originalEntityData;
|
|
99
96
|
if (!wrapped.__initialized) {
|
|
@@ -106,7 +103,7 @@ class ChangeSetComputer {
|
|
|
106
103
|
const comparator = this.comparator.getEntityComparator(entityName);
|
|
107
104
|
const diff = comparator(originalEntityData, data);
|
|
108
105
|
if (ignoreUndefined) {
|
|
109
|
-
|
|
106
|
+
Utils.keys(diff)
|
|
110
107
|
.filter(k => diff[k] === undefined)
|
|
111
108
|
.forEach(k => delete diff[k]);
|
|
112
109
|
}
|
|
@@ -116,32 +113,32 @@ class ChangeSetComputer {
|
|
|
116
113
|
}
|
|
117
114
|
processProperty(changeSet, prop, target) {
|
|
118
115
|
if (!target) {
|
|
119
|
-
const targets =
|
|
116
|
+
const targets = Utils.unwrapProperty(changeSet.entity, changeSet.meta, prop);
|
|
120
117
|
targets.forEach(([t]) => this.processProperty(changeSet, prop, t));
|
|
121
118
|
return;
|
|
122
119
|
}
|
|
123
|
-
if (
|
|
120
|
+
if (Utils.isCollection(target)) { // m:n or 1:m
|
|
124
121
|
this.processToMany(prop, changeSet);
|
|
125
122
|
}
|
|
126
|
-
if ([
|
|
123
|
+
if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) {
|
|
127
124
|
this.processToOne(prop, changeSet);
|
|
128
125
|
}
|
|
129
126
|
}
|
|
130
127
|
processToOne(prop, changeSet) {
|
|
131
|
-
const isToOneOwner = prop.kind ===
|
|
128
|
+
const isToOneOwner = prop.kind === ReferenceKind.MANY_TO_ONE || (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner);
|
|
132
129
|
if (!isToOneOwner || prop.mapToPk) {
|
|
133
130
|
return;
|
|
134
131
|
}
|
|
135
|
-
const targets =
|
|
132
|
+
const targets = Utils.unwrapProperty(changeSet.entity, changeSet.meta, prop);
|
|
136
133
|
targets.forEach(([target, idx]) => {
|
|
137
134
|
if (!target.__helper.hasPrimaryKey()) {
|
|
138
|
-
|
|
135
|
+
Utils.setPayloadProperty(changeSet.payload, this.metadata.find(changeSet.name), prop, target.__helper.__identifier, idx);
|
|
139
136
|
}
|
|
140
137
|
});
|
|
141
138
|
}
|
|
142
139
|
processToMany(prop, changeSet) {
|
|
143
140
|
const target = changeSet.entity[prop.name];
|
|
144
|
-
if (!target.isDirty() && changeSet.type !==
|
|
141
|
+
if (!target.isDirty() && changeSet.type !== ChangeSetType.CREATE) {
|
|
145
142
|
return;
|
|
146
143
|
}
|
|
147
144
|
this.collectionUpdates.add(target);
|
|
@@ -150,4 +147,3 @@ class ChangeSetComputer {
|
|
|
150
147
|
}
|
|
151
148
|
}
|
|
152
149
|
}
|
|
153
|
-
exports.ChangeSetComputer = ChangeSetComputer;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { MetadataStorage } from '../metadata';
|
|
2
|
-
import type { Dictionary, EntityDictionary, EntityMetadata, IHydrator } from '../typings';
|
|
3
|
-
import { type EntityFactory
|
|
4
|
-
import { type
|
|
5
|
-
import { type
|
|
6
|
-
import
|
|
1
|
+
import type { MetadataStorage } from '../metadata/MetadataStorage.js';
|
|
2
|
+
import type { Dictionary, EntityDictionary, EntityMetadata, IHydrator } from '../typings.js';
|
|
3
|
+
import { type EntityFactory } from '../entity/EntityFactory.js';
|
|
4
|
+
import { type EntityValidator } from '../entity/EntityValidator.js';
|
|
5
|
+
import { type ChangeSet } from './ChangeSet.js';
|
|
6
|
+
import { type Configuration } from '../utils/Configuration.js';
|
|
7
|
+
import type { DriverMethodOptions, IDatabaseDriver } from '../drivers/IDatabaseDriver.js';
|
|
7
8
|
export declare class ChangeSetPersister {
|
|
8
9
|
private readonly driver;
|
|
9
10
|
private readonly metadata;
|