#
Class: Hydratorcore.Hydrator
#
HierarchyHydrator
↳ ObjectHydrator
#
Implements- IHydrator
#
Constructors#
constructor+ new Hydrator(metadata
: MetadataStorage, platform
: Platform, config
: Configuration<IDatabaseDriver<Connection>>): Hydrator
#
Parameters:Name | Type |
---|---|
metadata | MetadataStorage |
platform | Platform |
config | Configuration<IDatabaseDriver<Connection>> |
Returns: Hydrator
Defined in: packages/core/src/hydration/Hydrator.ts:8
#
Properties#
config• Protected
Readonly
config: Configuration<IDatabaseDriver<Connection>>
#
metadata• Protected
Readonly
metadata: MetadataStorage
#
platform• Protected
Readonly
platform: Platform
#
Methods#
getPropertiesâ–¸ Protected
getProperties<T>(meta
: EntityMetadata<T>, type
: reference | full | returning): EntityProperty<T>[]
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<T> |
type | reference | full | returning |
Returns: EntityProperty<T>[]
Defined in: packages/core/src/hydration/Hydrator.ts:34
#
hydrateâ–¸ hydrate<T>(entity
: T, meta
: EntityMetadata<T>, data
: EntityData<T>, factory
: EntityFactory, type
: reference | full | returning, newEntity?
: boolean, convertCustomTypes?
: boolean): void
inheritdoc
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type | Default value |
---|---|---|
entity | T | - |
meta | EntityMetadata<T> | - |
data | EntityData<T> | - |
factory | EntityFactory | - |
type | reference | full | returning | - |
newEntity | boolean | false |
convertCustomTypes | boolean | false |
Returns: void
Implementation of: void
Defined in: packages/core/src/hydration/Hydrator.ts:17
#
hydratePropertyâ–¸ Protected
hydrateProperty<T>(entity
: T, prop
: EntityProperty<any>, data
: EntityData<T>, factory
: EntityFactory, newEntity?
: boolean, convertCustomTypes?
: boolean): void
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type |
---|---|
entity | T |
prop | EntityProperty<any> |
data | EntityData<T> |
factory | EntityFactory |
newEntity? | boolean |
convertCustomTypes? | boolean |
Returns: void
Defined in: packages/core/src/hydration/Hydrator.ts:47
#
hydrateReferenceâ–¸ hydrateReference<T>(entity
: T, meta
: EntityMetadata<T>, data
: EntityData<T>, factory
: EntityFactory, convertCustomTypes?
: boolean): void
inheritdoc
#
Type parameters:Name | Type |
---|---|
T | AnyEntity<T> |
#
Parameters:Name | Type |
---|---|
entity | T |
meta | EntityMetadata<T> |
data | EntityData<T> |
factory | EntityFactory |
convertCustomTypes? | boolean |
Returns: void
Implementation of: void
Defined in: packages/core/src/hydration/Hydrator.ts:28