@mikro-orm/core 7.0.0-dev.1 → 7.0.0-dev.3
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 +203 -203
- 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 +13 -14
- 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
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const enums_1 = require("../enums");
|
|
7
|
-
const SerializationContext_1 = require("./SerializationContext");
|
|
8
|
-
const RawQueryFragment_1 = require("../utils/RawQueryFragment");
|
|
1
|
+
import { helper, wrap } from '../entity/wrap.js';
|
|
2
|
+
import { Utils } from '../utils/Utils.js';
|
|
3
|
+
import { ReferenceKind } from '../enums.js';
|
|
4
|
+
import { SerializationContext } from './SerializationContext.js';
|
|
5
|
+
import { isRaw } from '../utils/RawQueryFragment.js';
|
|
9
6
|
function isVisible(meta, propName, ignoreFields = []) {
|
|
10
7
|
const prop = meta.properties[propName];
|
|
11
8
|
const visible = prop && !prop.hidden;
|
|
12
9
|
const prefixed = prop && !prop.primary && propName.startsWith('_'); // ignore prefixed properties, if it's not a PK
|
|
13
10
|
return visible && !prefixed && !ignoreFields.includes(propName);
|
|
14
11
|
}
|
|
15
|
-
class EntityTransformer {
|
|
12
|
+
export class EntityTransformer {
|
|
16
13
|
static toObject(entity, ignoreFields = [], raw = false) {
|
|
17
14
|
if (!Array.isArray(ignoreFields)) {
|
|
18
15
|
ignoreFields = [];
|
|
19
16
|
}
|
|
20
|
-
const wrapped =
|
|
17
|
+
const wrapped = helper(entity);
|
|
21
18
|
let contextCreated = false;
|
|
22
19
|
if (!wrapped) {
|
|
23
20
|
return entity;
|
|
24
21
|
}
|
|
25
22
|
if (!wrapped.__serializationContext.root) {
|
|
26
|
-
const root = new
|
|
27
|
-
|
|
23
|
+
const root = new SerializationContext(wrapped.__config, wrapped.__serializationContext.populate, wrapped.__serializationContext.fields, wrapped.__serializationContext.exclude);
|
|
24
|
+
SerializationContext.propagate(root, entity, isVisible);
|
|
28
25
|
contextCreated = true;
|
|
29
26
|
}
|
|
30
27
|
const root = wrapped.__serializationContext.root;
|
|
@@ -38,7 +35,7 @@ class EntityTransformer {
|
|
|
38
35
|
meta.primaryKeys.forEach(pk => keys.add(pk));
|
|
39
36
|
}
|
|
40
37
|
if (wrapped.isInitialized() || !wrapped.hasPrimaryKey()) {
|
|
41
|
-
|
|
38
|
+
Utils.keys(entity).forEach(prop => keys.add(prop));
|
|
42
39
|
}
|
|
43
40
|
const visited = root.visited.has(entity);
|
|
44
41
|
const includePrimaryKeys = wrapped.__config.get('serialization').includePrimaryKeys;
|
|
@@ -64,7 +61,7 @@ class EntityTransformer {
|
|
|
64
61
|
if (!cycle) {
|
|
65
62
|
root.leave(meta.className, prop);
|
|
66
63
|
}
|
|
67
|
-
if (
|
|
64
|
+
if (isRaw(val)) {
|
|
68
65
|
throw new Error(`Trying to serialize raw SQL fragment: '${val.sql}'`);
|
|
69
66
|
}
|
|
70
67
|
if (typeof val === 'undefined') {
|
|
@@ -111,7 +108,7 @@ class EntityTransformer {
|
|
|
111
108
|
return prop;
|
|
112
109
|
}
|
|
113
110
|
static processProperty(prop, entity, raw, populated) {
|
|
114
|
-
const wrapped =
|
|
111
|
+
const wrapped = helper(entity);
|
|
115
112
|
const property = wrapped.__meta.properties[prop] ?? { name: prop };
|
|
116
113
|
const serializer = property?.serializer;
|
|
117
114
|
const value = entity[prop];
|
|
@@ -126,23 +123,23 @@ class EntityTransformer {
|
|
|
126
123
|
if (serializer && !raw) {
|
|
127
124
|
return serializer(value);
|
|
128
125
|
}
|
|
129
|
-
if (
|
|
126
|
+
if (Utils.isCollection(value)) {
|
|
130
127
|
return EntityTransformer.processCollection(property, entity, raw, populated);
|
|
131
128
|
}
|
|
132
|
-
if (
|
|
129
|
+
if (Utils.isEntity(value, true)) {
|
|
133
130
|
return EntityTransformer.processEntity(property, entity, wrapped.__platform, raw, populated);
|
|
134
131
|
}
|
|
135
|
-
if (
|
|
132
|
+
if (Utils.isScalarReference(value)) {
|
|
136
133
|
return value.unwrap();
|
|
137
134
|
}
|
|
138
|
-
if (property.kind ===
|
|
135
|
+
if (property.kind === ReferenceKind.EMBEDDED) {
|
|
139
136
|
if (Array.isArray(value)) {
|
|
140
137
|
return value.map(item => {
|
|
141
|
-
const wrapped = item &&
|
|
138
|
+
const wrapped = item && helper(item);
|
|
142
139
|
return wrapped ? wrapped.toJSON() : item;
|
|
143
140
|
});
|
|
144
141
|
}
|
|
145
|
-
const wrapped = value &&
|
|
142
|
+
const wrapped = value && helper(value);
|
|
146
143
|
return wrapped ? wrapped.toJSON() : value;
|
|
147
144
|
}
|
|
148
145
|
const customType = property?.customType;
|
|
@@ -156,7 +153,7 @@ class EntityTransformer {
|
|
|
156
153
|
}
|
|
157
154
|
static processEntity(prop, entity, platform, raw, populated) {
|
|
158
155
|
const child = entity[prop.name];
|
|
159
|
-
const wrapped =
|
|
156
|
+
const wrapped = helper(child);
|
|
160
157
|
const meta = wrapped.__meta;
|
|
161
158
|
const visible = meta.primaryKeys.filter(prop => isVisible(meta, prop));
|
|
162
159
|
if (raw && wrapped.isInitialized() && child !== entity) {
|
|
@@ -172,17 +169,17 @@ class EntityTransformer {
|
|
|
172
169
|
return !wrapped.__managed;
|
|
173
170
|
}
|
|
174
171
|
if (wrapped.isInitialized() && isPopulated() && child !== entity) {
|
|
175
|
-
return
|
|
172
|
+
return wrap(child).toJSON();
|
|
176
173
|
}
|
|
177
174
|
let pk = wrapped.getPrimaryKey();
|
|
178
175
|
if (prop.customType) {
|
|
179
176
|
pk = prop.customType.toJSON(pk, wrapped.__platform);
|
|
180
177
|
}
|
|
181
178
|
if (wrapped.__config.get('serialization').forceObject) {
|
|
182
|
-
return
|
|
179
|
+
return Utils.primaryKeyToObject(meta, pk, visible);
|
|
183
180
|
}
|
|
184
|
-
if (
|
|
185
|
-
const pruned =
|
|
181
|
+
if (Utils.isPlainObject(pk)) {
|
|
182
|
+
const pruned = Utils.primaryKeyToObject(meta, pk, visible);
|
|
186
183
|
if (visible.length === 1) {
|
|
187
184
|
return platform.normalizePrimaryKey(pruned[visible[0]]);
|
|
188
185
|
}
|
|
@@ -193,22 +190,22 @@ class EntityTransformer {
|
|
|
193
190
|
static processCollection(prop, entity, raw, populated) {
|
|
194
191
|
const col = entity[prop.name];
|
|
195
192
|
if (raw && col.isInitialized(true)) {
|
|
196
|
-
return col.map(item =>
|
|
193
|
+
return col.map(item => helper(item).toPOJO());
|
|
197
194
|
}
|
|
198
195
|
if (col.shouldPopulate(populated)) {
|
|
199
196
|
return col.toArray();
|
|
200
197
|
}
|
|
201
198
|
if (col.isInitialized()) {
|
|
202
|
-
const wrapped =
|
|
199
|
+
const wrapped = helper(entity);
|
|
203
200
|
const forceObject = wrapped.__config.get('serialization').forceObject;
|
|
204
201
|
return col.map(item => {
|
|
205
|
-
const wrapped =
|
|
202
|
+
const wrapped = helper(item);
|
|
206
203
|
const pk = wrapped.getPrimaryKey();
|
|
207
204
|
if (prop.customType) {
|
|
208
205
|
return prop.customType.toJSON(pk, wrapped.__platform);
|
|
209
206
|
}
|
|
210
207
|
if (forceObject) {
|
|
211
|
-
return
|
|
208
|
+
return Utils.primaryKeyToObject(wrapped.__meta, pk);
|
|
212
209
|
}
|
|
213
210
|
return pk;
|
|
214
211
|
});
|
|
@@ -216,4 +213,3 @@ class EntityTransformer {
|
|
|
216
213
|
return undefined;
|
|
217
214
|
}
|
|
218
215
|
}
|
|
219
|
-
exports.EntityTransformer = EntityTransformer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AnyEntity, EntityMetadata, PopulateOptions } from '../typings';
|
|
2
|
-
import type { Configuration } from '../utils/Configuration';
|
|
1
|
+
import type { AnyEntity, EntityMetadata, PopulateOptions } from '../typings.js';
|
|
2
|
+
import type { Configuration } from '../utils/Configuration.js';
|
|
3
3
|
/**
|
|
4
4
|
* Helper that allows to keep track of where we are currently at when serializing complex entity graph with cycles.
|
|
5
5
|
* Before we process a property, we call `visit` that checks if it is not a cycle path (but allows to pass cycles that
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.SerializationContext = void 0;
|
|
4
|
-
const Utils_1 = require("../utils/Utils");
|
|
5
|
-
const wrap_1 = require("../entity/wrap");
|
|
1
|
+
import { Utils } from '../utils/Utils.js';
|
|
2
|
+
import { helper } from '../entity/wrap.js';
|
|
6
3
|
/**
|
|
7
4
|
* Helper that allows to keep track of where we are currently at when serializing complex entity graph with cycles.
|
|
8
5
|
* Before we process a property, we call `visit` that checks if it is not a cycle path (but allows to pass cycles that
|
|
9
6
|
* are defined in populate hint). If not, we proceed and call `leave` afterwards.
|
|
10
7
|
*/
|
|
11
|
-
class SerializationContext {
|
|
8
|
+
export class SerializationContext {
|
|
12
9
|
config;
|
|
13
10
|
populate;
|
|
14
11
|
fields;
|
|
@@ -39,14 +36,14 @@ class SerializationContext {
|
|
|
39
36
|
}
|
|
40
37
|
leave(entityName, prop) {
|
|
41
38
|
const last = this.path.pop();
|
|
42
|
-
/*
|
|
39
|
+
/* v8 ignore next 3 */
|
|
43
40
|
if (!last || last[0] !== entityName || last[1] !== prop) {
|
|
44
41
|
throw new Error(`Trying to leave wrong property: ${entityName}.${prop} instead of ${last?.join('.')}`);
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
44
|
close() {
|
|
48
45
|
for (const entity of this.entities) {
|
|
49
|
-
delete
|
|
46
|
+
delete helper(entity).__serializationContext.root;
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
/**
|
|
@@ -54,19 +51,19 @@ class SerializationContext {
|
|
|
54
51
|
*/
|
|
55
52
|
static propagate(root, entity, isVisible) {
|
|
56
53
|
root.register(entity);
|
|
57
|
-
const meta =
|
|
54
|
+
const meta = helper(entity).__meta;
|
|
58
55
|
for (const key of Object.keys(entity)) {
|
|
59
56
|
if (!isVisible(meta, key)) {
|
|
60
57
|
continue;
|
|
61
58
|
}
|
|
62
59
|
const target = entity[key];
|
|
63
|
-
if (
|
|
60
|
+
if (Utils.isEntity(target, true)) {
|
|
64
61
|
if (!target.__helper.__serializationContext.root) {
|
|
65
62
|
this.propagate(root, target, isVisible);
|
|
66
63
|
}
|
|
67
64
|
continue;
|
|
68
65
|
}
|
|
69
|
-
if (
|
|
66
|
+
if (Utils.isCollection(target)) {
|
|
70
67
|
for (const item of target.getItems(false)) {
|
|
71
68
|
if (!item.__helper.__serializationContext.root) {
|
|
72
69
|
this.propagate(root, item, isVisible);
|
|
@@ -98,7 +95,7 @@ class SerializationContext {
|
|
|
98
95
|
}
|
|
99
96
|
let fields = [...this.fields];
|
|
100
97
|
for (const segment of this.path) {
|
|
101
|
-
/*
|
|
98
|
+
/* v8 ignore next 3 */
|
|
102
99
|
if (fields.length === 0) {
|
|
103
100
|
return true;
|
|
104
101
|
}
|
|
@@ -109,8 +106,7 @@ class SerializationContext {
|
|
|
109
106
|
return fields.some(p => p === prop || p === '*');
|
|
110
107
|
}
|
|
111
108
|
register(entity) {
|
|
112
|
-
|
|
109
|
+
helper(entity).__serializationContext.root = this;
|
|
113
110
|
this.entities.add(entity);
|
|
114
111
|
}
|
|
115
112
|
}
|
|
116
|
-
exports.SerializationContext = SerializationContext;
|
package/serialization/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './EntityTransformer';
|
|
2
|
-
export * from './EntitySerializer';
|
|
3
|
-
export * from './SerializationContext';
|
|
1
|
+
export * from './EntityTransformer.js';
|
|
2
|
+
export * from './EntitySerializer.js';
|
|
3
|
+
export * from './SerializationContext.js';
|
package/serialization/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./EntityTransformer"), exports);
|
|
18
|
-
__exportStar(require("./EntitySerializer"), exports);
|
|
19
|
-
__exportStar(require("./SerializationContext"), exports);
|
|
1
|
+
export * from './EntityTransformer.js';
|
|
2
|
+
export * from './EntitySerializer.js';
|
|
3
|
+
export * from './SerializationContext.js';
|
package/types/ArrayType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type, type TransformContext } from './Type';
|
|
2
|
-
import type { EntityProperty } from '../typings';
|
|
3
|
-
import type { Platform } from '../platforms';
|
|
1
|
+
import { Type, type TransformContext } from './Type.js';
|
|
2
|
+
import type { EntityProperty } from '../typings.js';
|
|
3
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
4
4
|
export declare class ArrayType<T = string> extends Type<T[] | null, string | null> {
|
|
5
5
|
private readonly toJsValue;
|
|
6
6
|
private readonly toDbValue;
|
package/types/ArrayType.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
const errors_1 = require("../errors");
|
|
7
|
-
class ArrayType extends Type_1.Type {
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
import { Utils } from '../utils/Utils.js';
|
|
3
|
+
import { ValidationError } from '../errors.js';
|
|
4
|
+
export class ArrayType extends Type {
|
|
8
5
|
toJsValue;
|
|
9
6
|
toDbValue;
|
|
10
7
|
constructor(toJsValue = i => i, toDbValue = i => i) {
|
|
@@ -19,17 +16,17 @@ class ArrayType extends Type_1.Type {
|
|
|
19
16
|
if (Array.isArray(value)) {
|
|
20
17
|
return platform.marshallArray(value.map(i => this.toDbValue(i)));
|
|
21
18
|
}
|
|
22
|
-
/*
|
|
19
|
+
/* v8 ignore next 3 */
|
|
23
20
|
if (context?.fromQuery) {
|
|
24
21
|
return value;
|
|
25
22
|
}
|
|
26
|
-
throw
|
|
23
|
+
throw ValidationError.invalidType(ArrayType, value, 'JS');
|
|
27
24
|
}
|
|
28
25
|
convertToJSValue(value, platform) {
|
|
29
26
|
if (value == null) {
|
|
30
27
|
return value;
|
|
31
28
|
}
|
|
32
|
-
if (
|
|
29
|
+
if (Utils.isString(value)) {
|
|
33
30
|
value = platform.unmarshallArray(value);
|
|
34
31
|
}
|
|
35
32
|
return value.map(i => this.toJsValue(i));
|
|
@@ -44,4 +41,3 @@ class ArrayType extends Type_1.Type {
|
|
|
44
41
|
return platform.getArrayDeclarationSQL();
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
|
-
exports.ArrayType = ArrayType;
|
package/types/BigIntType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type } from './Type';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
/**
|
|
5
5
|
* This type will automatically convert string values returned from the database to native JS bigints (default)
|
|
6
6
|
* or numbers (safe only for values up to `Number.MAX_SAFE_INTEGER`), or strings, depending on the `mode`.
|
package/types/BigIntType.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BigIntType = void 0;
|
|
4
|
-
const Type_1 = require("./Type");
|
|
1
|
+
import { Type } from './Type.js';
|
|
5
2
|
/**
|
|
6
3
|
* This type will automatically convert string values returned from the database to native JS bigints (default)
|
|
7
4
|
* or numbers (safe only for values up to `Number.MAX_SAFE_INTEGER`), or strings, depending on the `mode`.
|
|
8
5
|
*/
|
|
9
|
-
class BigIntType extends
|
|
6
|
+
export class BigIntType extends Type {
|
|
10
7
|
mode;
|
|
11
8
|
constructor(mode) {
|
|
12
9
|
super();
|
|
@@ -19,6 +16,7 @@ class BigIntType extends Type_1.Type {
|
|
|
19
16
|
return '' + value;
|
|
20
17
|
}
|
|
21
18
|
convertToJSValue(value) {
|
|
19
|
+
/* v8 ignore next 3 */
|
|
22
20
|
if (value == null) {
|
|
23
21
|
return value;
|
|
24
22
|
}
|
|
@@ -45,4 +43,3 @@ class BigIntType extends Type_1.Type {
|
|
|
45
43
|
return this.mode ?? 'bigint';
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
|
-
exports.BigIntType = BigIntType;
|
package/types/BlobType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Uint8ArrayType } from './Uint8ArrayType';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { Uint8ArrayType } from './Uint8ArrayType.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
export declare class BlobType extends Uint8ArrayType {
|
|
5
5
|
convertToJSValue(value: Buffer): Buffer | null;
|
|
6
6
|
compareAsType(): string;
|
package/types/BlobType.js
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.BlobType = void 0;
|
|
4
|
-
const Uint8ArrayType_1 = require("./Uint8ArrayType");
|
|
5
|
-
class BlobType extends Uint8ArrayType_1.Uint8ArrayType {
|
|
1
|
+
import { Uint8ArrayType } from './Uint8ArrayType.js';
|
|
2
|
+
export class BlobType extends Uint8ArrayType {
|
|
6
3
|
convertToJSValue(value) {
|
|
7
4
|
if (value instanceof Buffer || !value) {
|
|
8
5
|
return value;
|
|
9
6
|
}
|
|
10
|
-
/* istanbul ignore else */
|
|
11
7
|
if (value.buffer instanceof Buffer) {
|
|
12
8
|
return value.buffer;
|
|
13
9
|
}
|
|
14
|
-
/* istanbul ignore next */
|
|
15
10
|
return Buffer.from(value);
|
|
16
11
|
}
|
|
17
12
|
compareAsType() {
|
|
@@ -24,4 +19,3 @@ class BlobType extends Uint8ArrayType_1.Uint8ArrayType {
|
|
|
24
19
|
return platform.getBlobDeclarationSQL();
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
|
-
exports.BlobType = BlobType;
|
package/types/BooleanType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type } from './Type';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
export declare class BooleanType extends Type<number | null | undefined, number | null | undefined> {
|
|
5
5
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
6
|
compareAsType(): string;
|
package/types/BooleanType.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.BooleanType = void 0;
|
|
4
|
-
const Type_1 = require("./Type");
|
|
5
|
-
class BooleanType extends Type_1.Type {
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
export class BooleanType extends Type {
|
|
6
3
|
getColumnType(prop, platform) {
|
|
7
4
|
return platform.getBooleanTypeDeclarationSQL();
|
|
8
5
|
}
|
|
@@ -13,4 +10,3 @@ class BooleanType extends Type_1.Type {
|
|
|
13
10
|
return false;
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
|
-
exports.BooleanType = BooleanType;
|
package/types/CharacterType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StringType } from './StringType';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { StringType } from './StringType.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
export declare class CharacterType extends StringType {
|
|
5
5
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
6
|
getDefaultLength(platform: Platform): number;
|
package/types/CharacterType.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.CharacterType = void 0;
|
|
4
|
-
const StringType_1 = require("./StringType");
|
|
5
|
-
class CharacterType extends StringType_1.StringType {
|
|
1
|
+
import { StringType } from './StringType.js';
|
|
2
|
+
export class CharacterType extends StringType {
|
|
6
3
|
getColumnType(prop, platform) {
|
|
7
4
|
return platform.getCharTypeDeclarationSQL(prop);
|
|
8
5
|
}
|
|
@@ -10,4 +7,3 @@ class CharacterType extends StringType_1.StringType {
|
|
|
10
7
|
return platform.getDefaultCharLength();
|
|
11
8
|
}
|
|
12
9
|
}
|
|
13
|
-
exports.CharacterType = CharacterType;
|
package/types/DateTimeType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type } from './Type';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
export declare class DateTimeType extends Type<Date, string> {
|
|
5
5
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
6
|
compareAsType(): string;
|
package/types/DateTimeType.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DateTimeType = void 0;
|
|
4
|
-
const Type_1 = require("./Type");
|
|
5
|
-
class DateTimeType extends Type_1.Type {
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
export class DateTimeType extends Type {
|
|
6
3
|
getColumnType(prop, platform) {
|
|
7
4
|
return platform.getDateTimeTypeDeclarationSQL({ length: prop.length });
|
|
8
5
|
}
|
|
@@ -19,4 +16,3 @@ class DateTimeType extends Type_1.Type {
|
|
|
19
16
|
return platform.getDefaultDateTimeLength();
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
exports.DateTimeType = DateTimeType;
|
package/types/DateType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type } from './Type';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
export declare class DateType extends Type<string | null | undefined, string | null | undefined> {
|
|
5
5
|
compareAsType(): string;
|
|
6
6
|
ensureComparable(): boolean;
|
package/types/DateType.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DateType = void 0;
|
|
4
|
-
const Type_1 = require("./Type");
|
|
5
|
-
class DateType extends Type_1.Type {
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
export class DateType extends Type {
|
|
6
3
|
compareAsType() {
|
|
7
4
|
return 'string';
|
|
8
5
|
}
|
|
@@ -19,4 +16,3 @@ class DateType extends Type_1.Type {
|
|
|
19
16
|
return 0;
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
exports.DateType = DateType;
|
package/types/DecimalType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type } from './Type';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
/**
|
|
5
5
|
* Type that maps an SQL DECIMAL to a JS string or number.
|
|
6
6
|
*/
|
package/types/DecimalType.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DecimalType = void 0;
|
|
4
|
-
const Type_1 = require("./Type");
|
|
1
|
+
import { Type } from './Type.js';
|
|
5
2
|
/**
|
|
6
3
|
* Type that maps an SQL DECIMAL to a JS string or number.
|
|
7
4
|
*/
|
|
8
|
-
class DecimalType extends
|
|
5
|
+
export class DecimalType extends Type {
|
|
9
6
|
mode;
|
|
10
7
|
constructor(mode) {
|
|
11
8
|
super();
|
|
12
9
|
this.mode = mode;
|
|
13
10
|
}
|
|
11
|
+
/* v8 ignore next 7 */
|
|
14
12
|
convertToJSValue(value) {
|
|
15
13
|
if ((this.mode ?? this.prop?.runtimeType) === 'number') {
|
|
16
14
|
return +value;
|
|
@@ -21,7 +19,7 @@ class DecimalType extends Type_1.Type {
|
|
|
21
19
|
return this.format(a) === this.format(b);
|
|
22
20
|
}
|
|
23
21
|
format(val) {
|
|
24
|
-
/*
|
|
22
|
+
/* v8 ignore next 3 */
|
|
25
23
|
if (this.prop?.scale == null) {
|
|
26
24
|
return +val;
|
|
27
25
|
}
|
|
@@ -35,4 +33,3 @@ class DecimalType extends Type_1.Type {
|
|
|
35
33
|
return this.mode ?? this.prop?.runtimeType ?? 'string';
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
|
-
exports.DecimalType = DecimalType;
|
package/types/DoubleType.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Type } from './Type';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { Type } from './Type.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { EntityProperty } from '../typings.js';
|
|
4
4
|
/**
|
|
5
5
|
* Type that maps an SQL DOUBLE to a JS string or number.
|
|
6
6
|
*/
|
package/types/DoubleType.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DoubleType = void 0;
|
|
4
|
-
const Type_1 = require("./Type");
|
|
1
|
+
import { Type } from './Type.js';
|
|
5
2
|
/**
|
|
6
3
|
* Type that maps an SQL DOUBLE to a JS string or number.
|
|
7
4
|
*/
|
|
8
|
-
class DoubleType extends
|
|
5
|
+
export class DoubleType extends Type {
|
|
6
|
+
/* v8 ignore next 7 */
|
|
9
7
|
convertToJSValue(value) {
|
|
10
8
|
if (this.prop?.runtimeType === 'number') {
|
|
11
9
|
return +value;
|
|
@@ -19,4 +17,3 @@ class DoubleType extends Type_1.Type {
|
|
|
19
17
|
return this.prop?.runtimeType ?? 'number';
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
|
-
exports.DoubleType = DoubleType;
|
package/types/EnumArrayType.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ArrayType } from './ArrayType';
|
|
2
|
-
import type { Platform } from '../platforms';
|
|
3
|
-
import type { TransformContext } from './Type';
|
|
4
|
-
import type { EntityProperty } from '../typings';
|
|
1
|
+
import { ArrayType } from './ArrayType.js';
|
|
2
|
+
import type { Platform } from '../platforms/Platform.js';
|
|
3
|
+
import type { TransformContext } from './Type.js';
|
|
4
|
+
import type { EntityProperty } from '../typings.js';
|
|
5
5
|
export declare class EnumArrayType<T extends string | number = string> extends ArrayType<T> {
|
|
6
6
|
private readonly owner;
|
|
7
7
|
private readonly items?;
|
package/types/EnumArrayType.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const node_util_1 = require("node:util");
|
|
5
|
-
const ArrayType_1 = require("./ArrayType");
|
|
6
|
-
const errors_1 = require("../errors");
|
|
1
|
+
import { inspect } from 'node:util';
|
|
2
|
+
import { ArrayType } from './ArrayType.js';
|
|
3
|
+
import { ValidationError } from '../errors.js';
|
|
7
4
|
function mapHydrator(items, hydrate) {
|
|
8
5
|
if (items && items.length > 0 && typeof items[0] === 'number') {
|
|
9
6
|
return (i) => +i;
|
|
10
7
|
}
|
|
11
8
|
return hydrate;
|
|
12
9
|
}
|
|
13
|
-
class EnumArrayType extends
|
|
10
|
+
export class EnumArrayType extends ArrayType {
|
|
14
11
|
owner;
|
|
15
12
|
items;
|
|
16
13
|
constructor(owner, items, hydrate = i => i) {
|
|
@@ -19,11 +16,10 @@ class EnumArrayType extends ArrayType_1.ArrayType {
|
|
|
19
16
|
this.items = items;
|
|
20
17
|
}
|
|
21
18
|
convertToDatabaseValue(value, platform, context) {
|
|
22
|
-
/* istanbul ignore else */
|
|
23
19
|
if (Array.isArray(value) && Array.isArray(this.items)) {
|
|
24
20
|
const invalid = value.filter(v => !this.items.includes(v));
|
|
25
21
|
if (invalid.length > 0) {
|
|
26
|
-
throw new
|
|
22
|
+
throw new ValidationError(`Invalid enum array items provided in ${this.owner}: ${inspect(invalid)}`);
|
|
27
23
|
}
|
|
28
24
|
}
|
|
29
25
|
return super.convertToDatabaseValue(value, platform, context);
|
|
@@ -35,4 +31,3 @@ class EnumArrayType extends ArrayType_1.ArrayType {
|
|
|
35
31
|
return super.getColumnType(prop, platform);
|
|
36
32
|
}
|
|
37
33
|
}
|
|
38
|
-
exports.EnumArrayType = EnumArrayType;
|