Skip to main content
Version: 4.4

Class: MetadataStorage#

core.MetadataStorage

Hierarchy#

  • MetadataStorage

Constructors#

constructor#

+ new MetadataStorage(metadata?: Dictionary<EntityMetadata<any>>): MetadataStorage

Parameters:#

NameTypeDefault value
metadataDictionary<EntityMetadata<any>>...

Returns: MetadataStorage

Defined in: packages/core/src/metadata/MetadataStorage.ts:12

Properties#

metadata#

Private Readonly metadata: Dictionary<EntityMetadata<any>>

Defined in: packages/core/src/metadata/MetadataStorage.ts:12


metadata#

Private Readonly Static metadata: Dictionary<EntityMetadata<any>>

Defined in: packages/core/src/metadata/MetadataStorage.ts:10


subscribers#

Private Readonly Static subscribers: Dictionary<EventSubscriber<any>>

Defined in: packages/core/src/metadata/MetadataStorage.ts:11

Methods#

decorate#

decorate(em: EntityManager<IDatabaseDriver<Connection>>): void

Parameters:#

NameType
emEntityManager<IDatabaseDriver<Connection>>

Returns: void

Defined in: packages/core/src/metadata/MetadataStorage.ts:103


find#

find<T>(entity: string): undefined | EntityMetadata<T>

Type parameters:#

NameTypeDefault
TAnyEntity<T>any

Parameters:#

NameType
entitystring

Returns: undefined | EntityMetadata<T>

Defined in: packages/core/src/metadata/MetadataStorage.ts:87


get#

get<T>(entity: string, init?: boolean, validate?: boolean): EntityMetadata<T>

Type parameters:#

NameTypeDefault
TAnyEntity<T>any

Parameters:#

NameTypeDefault value
entitystring-
initbooleanfalse
validatebooleantrue

Returns: EntityMetadata<T>

Defined in: packages/core/src/metadata/MetadataStorage.ts:75


getAll#

getAll(): Dictionary<EntityMetadata<any>>

Returns: Dictionary<EntityMetadata<any>>

Defined in: packages/core/src/metadata/MetadataStorage.ts:59


getByDiscriminatorColumn#

getByDiscriminatorColumn<T>(meta: EntityMetadata<T>, data: EntityData<T>): undefined | EntityMetadata<T>

Type parameters:#

Name
T

Parameters:#

NameType
metaEntityMetadata<T>
dataEntityData<T>

Returns: undefined | EntityMetadata<T>

Defined in: packages/core/src/metadata/MetadataStorage.ts:63


has#

has(entity: string): boolean

Parameters:#

NameType
entitystring

Returns: boolean

Defined in: packages/core/src/metadata/MetadataStorage.ts:91


reset#

reset(entity: string): void

Parameters:#

NameType
entitystring

Returns: void

Defined in: packages/core/src/metadata/MetadataStorage.ts:99


set#

set(entity: string, meta: EntityMetadata<any>): EntityMetadata<any>

Parameters:#

NameType
entitystring
metaEntityMetadata<any>

Returns: EntityMetadata<any>

Defined in: packages/core/src/metadata/MetadataStorage.ts:95


clear#

Staticclear(): void

Returns: void

Defined in: packages/core/src/metadata/MetadataStorage.ts:54


getMetadata#

StaticgetMetadata(): Dictionary<EntityMetadata<any>>

Returns: Dictionary<EntityMetadata<any>>

Defined in: packages/core/src/metadata/MetadataStorage.ts:18

StaticgetMetadata<T>(entity: string, path: string): EntityMetadata<T>

Type parameters:#

NameTypeDefault
TAnyEntity<T>any

Parameters:#

NameType
entitystring
pathstring

Returns: EntityMetadata<T>

Defined in: packages/core/src/metadata/MetadataStorage.ts:19


getMetadataFromDecorator#

StaticgetMetadataFromDecorator<T>(target: T & Dictionary<any>): EntityMetadata<T>

Type parameters:#

NameDefault
Tany

Parameters:#

NameType
targetT & Dictionary<any>

Returns: EntityMetadata<T>

Defined in: packages/core/src/metadata/MetadataStorage.ts:38


getSubscriberMetadata#

StaticgetSubscriberMetadata(): Dictionary<EventSubscriber<any>>

Returns: Dictionary<EventSubscriber<any>>

Defined in: packages/core/src/metadata/MetadataStorage.ts:46


init#

Staticinit(): MetadataStorage

Returns: MetadataStorage

Defined in: packages/core/src/metadata/MetadataStorage.ts:50


isKnownEntity#

StaticisKnownEntity(name: string): boolean

Parameters:#

NameType
namestring

Returns: boolean

Defined in: packages/core/src/metadata/MetadataStorage.ts:34

Last updated on by Martin Adámek