Skip to main content
Version: 4.5

Class: Hydrator#

core.Hydrator

Hierarchy#

Implements#

  • IHydrator

Constructors#

constructor#

+ new Hydrator(metadata: MetadataStorage, platform: Platform, config: Configuration<IDatabaseDriver<Connection>>): Hydrator

Parameters:#

NameType
metadataMetadataStorage
platformPlatform
configConfiguration<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#

ProtectedgetProperties<T>(meta: EntityMetadata<T>, type: reference | full | returning): EntityProperty<T>[]

Type parameters:#

NameType
TAnyEntity<T>

Parameters:#

NameType
metaEntityMetadata<T>
typereference | 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:#

NameType
TAnyEntity<T>

Parameters:#

NameTypeDefault value
entityT-
metaEntityMetadata<T>-
dataEntityData<T>-
factoryEntityFactory-
typereference | full | returning-
newEntitybooleanfalse
convertCustomTypesbooleanfalse

Returns: void

Implementation of: void

Defined in: packages/core/src/hydration/Hydrator.ts:17


hydrateProperty#

ProtectedhydrateProperty<T>(entity: T, prop: EntityProperty<any>, data: EntityData<T>, factory: EntityFactory, newEntity?: boolean, convertCustomTypes?: boolean): void

Type parameters:#

NameType
TAnyEntity<T>

Parameters:#

NameType
entityT
propEntityProperty<any>
dataEntityData<T>
factoryEntityFactory
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:#

NameType
TAnyEntity<T>

Parameters:#

NameType
entityT
metaEntityMetadata<T>
dataEntityData<T>
factoryEntityFactory
convertCustomTypes?boolean

Returns: void

Implementation of: void

Defined in: packages/core/src/hydration/Hydrator.ts:28

Last updated on by Renovate Bot