Version: 4.2

Overview

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AnyEntity

Ƭ AnyEntity<T>: Partial<T> & { [EntityRepositoryType]?: unknown ; [PrimaryKeyType]?: unknown ; helper?: IWrappedEntityInternal<T, keyof T> ; meta?: EntityMetadata<T> ; __platform?: Platform }

Defined in packages/core/src/typings.ts:101

Type parameters:

NameDefault
Tany

CliUpDownOptions

Ƭ CliUpDownOptions: { from?: string | number ; only?: string ; to?: string | number }

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:186

Type declaration:

NameType
from?string | number
only?string
to?string | number

Comparator

Ƭ Comparator<T>: (a: T, b: T) => EntityData<T>

Defined in packages/core/src/utils/EntityComparator.ts:7

Type parameters:

Name
T

Constructor

Ƭ Constructor<T>: {}

Defined in packages/core/src/typings.ts:8

Type parameters:

Name
T

DeepPartial

Ƭ DeepPartial<T>: T & {}

Defined in packages/core/src/typings.ts:13

Type parameters:

Name
T

Dictionary

Ƭ Dictionary<T>: { [k:string]: T; }

Defined in packages/core/src/typings.ts:9

Type parameters:

NameDefault
Tany

EmbeddedOptions

Ƭ EmbeddedOptions: { entity?: string | () => AnyEntity ; nullable?: boolean ; object?: boolean ; prefix?: string | boolean ; type?: string }

Defined in packages/core/src/decorators/Embedded.ts:19

Type declaration:

NameType
entity?string | () => AnyEntity
nullable?boolean
object?boolean
prefix?string | boolean
type?string

EntityClass

Ƭ EntityClass<T>: Function & { prototype: T }

Defined in packages/core/src/typings.ts:110

Type parameters:

NameType
TAnyEntity<T>

EntityClassGroup

Ƭ EntityClassGroup<T>: { entity: EntityClass<T> ; schema: EntityMetadata<T> | EntitySchema<T> }

Defined in packages/core/src/typings.ts:111

Type parameters:

NameType
TAnyEntity<T>

Type declaration:

NameType
entityEntityClass<T>
schemaEntityMetadata<T> | EntitySchema<T>

EntityData

Ƭ EntityData<T>: {} & Dictionary

Defined in packages/core/src/typings.ts:113

Type parameters:

Name
T

EntityHydrator

Ƭ EntityHydrator<T>: (entity: T, data: EntityData<T>, factory: EntityFactory, newEntity: boolean, convertCustomTypes: boolean) => void

Defined in packages/core/src/hydration/ObjectHydrator.ts:9

Type parameters:

Name
T

EntityName

Ƭ EntityName<T>: string | EntityClass<T> | EntitySchema<T, any>

Defined in packages/core/src/typings.ts:112

Type parameters:

NameType
TAnyEntity<T>

EntityOptions

Ƭ EntityOptions<T>: { abstract?: boolean ; collection?: string ; comment?: string ; customRepository?: () => Constructor<EntityRepository<T>> ; discriminatorColumn?: string ; discriminatorMap?: Dictionary<string> ; discriminatorValue?: string ; readonly?: boolean ; tableName?: string }

Defined in packages/core/src/decorators/Entity.ts:20

Type parameters:

Name
T

Type declaration:

NameType
abstract?boolean
collection?string
comment?string
customRepository?() => Constructor<EntityRepository<T>>
discriminatorColumn?string
discriminatorMap?Dictionary<string>
discriminatorValue?string
readonly?boolean
tableName?string

ExpandObject

Ƭ ExpandObject<U>: {} | FilterValue<ExpandProperty<U>>

Defined in packages/core/src/typings.ts:61

Type parameters:

Name
U

ExpandProperty

Ƭ ExpandProperty<T>: T extends Reference<infer U> ? NonNullable<U> : T extends Collection<infer U> ? NonNullable<U> : NonNullable<T>

Defined in packages/core/src/typings.ts:349

Type parameters:

Name
T

ExpandScalar

Ƭ ExpandScalar<T>: null | T extends string ? string | RegExp : T extends Date ? Date | string : T

Defined in packages/core/src/typings.ts:33

Type parameters:

Name
T

Field

Ƭ Field<T>: string | keyof T | KnexStringRef | KnexQueryBuilder

Defined in packages/knex/src/typings.ts:14

Type parameters:

Name
T

FilterDef

Ƭ FilterDef<T>: { args?: boolean ; cond: FilterQuery<T> | (args: Dictionary, type: "read" | "update" | "delete") => FilterQuery<T> | Promise<FilterQuery<T>> ; default?: boolean ; entity?: string[] ; name: string }

Defined in packages/core/src/typings.ts:341

Type parameters:

NameType
TAnyEntity<T>

Type declaration:

NameType
args?boolean
condFilterQuery<T> | (args: Dictionary, type: "read" | "update" | "delete") => FilterQuery<T> | Promise<FilterQuery<T>>
default?boolean
entity?string[]
namestring

FilterQuery

Ƭ FilterQuery<T>: NonNullable<Query<T>> | { [PrimaryKeyType]?: any }

Defined in packages/core/src/typings.ts:68

Type parameters:

Name
T

FilterValue

Ƭ FilterValue<T>: OperatorMap<FilterValue2<T>> | FilterValue2<T> | FilterValue2<T>[] | null

Defined in packages/core/src/typings.ts:60

Type parameters:

Name
T

FilterValue2

Ƭ FilterValue2<T>: T | ExpandScalar<T> | Primary<T>

Defined in packages/core/src/typings.ts:59

Type parameters:

Name
T

GenerateOptions

Ƭ GenerateOptions: { blank?: boolean ; disableFkChecks?: boolean ; dump?: boolean ; initial?: boolean ; path?: string }

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:187

Type declaration:

NameType
blank?boolean
disableFkChecks?boolean
dump?boolean
initial?boolean
path?string

GetRepository

Ƭ GetRepository<T, U>: T[typeof EntityRepositoryType] extends EntityRepository<any> | undefined ? NonNullable<T[typeof EntityRepositoryType]> : U

Defined in packages/core/src/typings.ts:114

Type parameters:

NameType
TAnyEntity<T>
U-

IPrimaryKey

Ƭ IPrimaryKey<T>: T

Defined in packages/core/src/typings.ts:29

Type parameters:

NameTypeDefault
TIPrimaryKeyValueIPrimaryKeyValue

IPrimaryKeyValue

Ƭ IPrimaryKeyValue: number | string | bigint | Date | { toHexString: () => string }

Defined in packages/core/src/typings.ts:28


IdentifiedReference

Ƭ IdentifiedReference<T, PK>: {} & Reference<T>

Defined in packages/core/src/entity/Reference.ts:4

Type parameters:

NameTypeDefault
TAnyEntity<T>-
PKkeyof T"id" & keyof T

KnexStringRef

Ƭ KnexStringRef: Ref<string, { [alias:string]: string; }>

Defined in packages/knex/src/typings.ts:10


Loaded

Ƭ Loaded<T, P>: unknown extends P ? T : T & {}

Defined in packages/core/src/typings.ts:390

Type parameters:

NameTypeDefault
TAnyEntity<T>-
P-unknown

LoadedIfInKeyHint

Ƭ LoadedIfInKeyHint<T, K, H>: K extends H ? MarkLoaded<T, T[K]> : T[K]

Defined in packages/core/src/typings.ts:377

Type parameters:

NameType
TAnyEntity<T>
Kkeyof T
H-

LoadedIfInNestedHint

Ƭ LoadedIfInNestedHint<T, K, H>: K extends keyof H ? MarkLoaded<T, T[K], H[K]> : T[K]

Defined in packages/core/src/typings.ts:379

Type parameters:

NameType
TAnyEntity<T>
Kkeyof T
H-

LoggerNamespace

Ƭ LoggerNamespace: "query" | "query-params" | "discovery" | "info"

Defined in packages/core/src/utils/Logger.ts:34


MarkLoaded

Ƭ MarkLoaded<T, P, H>: P extends Reference<infer U> ? LoadedReference<U, Loaded<U, H>> : P extends Collection<infer U> ? LoadedCollection<U, Loaded<U, H>> : P

Defined in packages/core/src/typings.ts:371

Type parameters:

NameTypeDefault
TAnyEntity<T>-
P--
H-unknown

Metadata

Ƭ Metadata<T, U>: Omit<Partial<EntityMetadata<T>>, "name" | "properties"> & { name: string } | { class: Constructor<T> ; name?: string } & { properties?: {} }

Defined in packages/core/src/metadata/EntitySchema.ts:23

Type parameters:

Name
T
U

MigrateOptions

Ƭ MigrateOptions: { from?: string | number ; migrations?: string[] ; to?: string | number ; transaction?: Transaction }

Defined in packages/core/src/typings.ts:319

Defined in packages/migrations/src/typings.ts:4

Type declaration:

NameType
from?string | number
migrations?string[]
to?string | number
transaction?Transaction

MigrationResult

Ƭ MigrationResult: { code: string ; diff: string[] ; fileName: string }

Defined in packages/core/src/typings.ts:320

Defined in packages/migrations/src/typings.ts:5

Type declaration:

NameType
codestring
diffstring[]
fileNamestring

MigrationRow

Ƭ MigrationRow: { executed_at: Date ; name: string }

Defined in packages/core/src/typings.ts:321

Defined in packages/migrations/src/typings.ts:6

Type declaration:

NameType
executed_atDate
namestring

MigrationsOptions

Ƭ MigrationsOptions: { allOrNothing?: boolean ; disableForeignKeys?: boolean ; dropTables?: boolean ; emit?: "js" | "ts" ; fileName?: (timestamp: string) => string ; migrationsList?: MigrationObject[] ; path?: string ; pattern?: RegExp ; safe?: boolean ; tableName?: string ; transactional?: boolean }

Defined in packages/core/src/utils/Configuration.ts:286

Type declaration:

NameType
allOrNothing?boolean
disableForeignKeys?boolean
dropTables?boolean
emit?"js" | "ts"
fileName?(timestamp: string) => string
migrationsList?MigrationObject[]
path?string
pattern?RegExp
safe?boolean
tableName?string
transactional?boolean

MigratorMethod

Ƭ MigratorMethod: "create" | "up" | "down" | "list" | "pending"

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:185


NestedLoadHint

Ƭ NestedLoadHint<T>: {}

Defined in packages/core/src/typings.ts:386

Type parameters:

Name
T

New

Ƭ New<T, P>: Loaded<T, P>

Defined in packages/core/src/typings.ts:398

Type parameters:

NameTypeDefault
TAnyEntity<T>-
P-string[]

NonFunctionPropertyNames

Ƭ NonFunctionPropertyNames<T>: NonNullable<{}[keyof T]>

Defined in packages/core/src/typings.ts:11

Type parameters:

Name
T

ORMDomain

Ƭ ORMDomain: Domain & { __mikro_orm_context?: RequestContext }

Defined in packages/core/src/utils/RequestContext.ts:5


OneToManyOptions

Ƭ OneToManyOptions<T, O>: ReferenceOptions<T, O> & { entity?: string | () => EntityName<T> ; inverseJoinColumn?: string ; inverseJoinColumns?: string[] ; joinColumn?: string ; joinColumns?: string[] ; mappedBy: string & keyof T | (e: T) => any ; orderBy?: { [field:string]: QueryOrder; } ; orphanRemoval?: boolean ; referenceColumnName?: string }

Defined in packages/core/src/decorators/OneToMany.ts:40

Type parameters:

Name
T
O

OperatorMap

Ƭ OperatorMap<T>: { $and?: Query<T>[] ; $contained?: string[] ; $contains?: string[] ; $eq?: ExpandScalar<T> ; $gt?: ExpandScalar<T> ; $gte?: ExpandScalar<T> ; $ilike?: string ; $in?: ExpandScalar<T>[] ; $like?: string ; $lt?: ExpandScalar<T> ; $lte?: ExpandScalar<T> ; $ne?: ExpandScalar<T> ; $nin?: ExpandScalar<T>[] ; $not?: Query<T> ; $or?: Query<T>[] ; $overlap?: string[] ; $re?: string }

Defined in packages/core/src/typings.ts:39

Type parameters:

Name
T

Type declaration:

NameType
$and?Query<T>[]
$contained?string[]
$contains?string[]
$eq?ExpandScalar<T>
$gt?ExpandScalar<T>
$gte?ExpandScalar<T>
$ilike?string
$in?ExpandScalar<T>[]
$like?string
$lt?ExpandScalar<T>
$lte?ExpandScalar<T>
$ne?ExpandScalar<T>
$nin?ExpandScalar<T>[]
$not?Query<T>
$or?Query<T>[]
$overlap?string[]
$re?string

Options

Ƭ Options<T, D>: Pick<MikroORMOptions<D>, Exclude<keyof MikroORMOptions<D>, keyof typeof DEFAULTS>> & Partial<MikroORMOptions<D>>

Defined in packages/cli/src/commands/GenerateEntitiesCommand.ts:6

Defined in packages/cli/src/commands/SchemaCommandFactory.ts:118

Defined in packages/cli/src/commands/MigrationCommandFactory.ts:188

Defined in packages/core/src/entity/EntityLoader.ts:10

Defined in packages/core/src/utils/Configuration.ts:377

Type parameters:

NameTypeDefault
TAnyEntity<T>-
DIDatabaseDriverIDatabaseDriver

PkGetter

Ƭ PkGetter<T>: (entity: T) => Primary<T>

Defined in packages/core/src/utils/EntityComparator.ts:10

Type parameters:

Name
T

PkSerializer

Ƭ PkSerializer<T>: (entity: T) => string

Defined in packages/core/src/utils/EntityComparator.ts:11

Type parameters:

Name
T

Populate

Ƭ Populate<T>: readonly keyof T[] | readonly string[] | boolean | PopulateMap<T>

Defined in packages/core/src/typings.ts:352

Type parameters:

Name
T

PopulateChildren

Ƭ PopulateChildren<T>: {}

Defined in packages/core/src/typings.ts:350

Type parameters:

Name
T

PopulateMap

Ƭ PopulateMap<T>: boolean | LoadStrategy | PopulateChildren<T>

Defined in packages/core/src/typings.ts:351

Type parameters:

Name
T

PopulateOptions

Ƭ PopulateOptions<T>: { all?: boolean ; children?: PopulateOptions<T[keyof T]>[] ; field: string ; strategy?: LoadStrategy }

Defined in packages/core/src/typings.ts:354

Type parameters:

Name
T

Type declaration:

NameType
all?boolean
children?PopulateOptions<T[keyof T]>[]
fieldstring
strategy?LoadStrategy

Primary

Ƭ Primary<T>: T extends { [PrimaryKeyType]: infer PK } ? PK : T extends { _id: infer PK } ? PK | string : T extends { uuid: infer PK } ? PK : T extends { id: infer PK } ? PK : never

Defined in packages/core/src/typings.ts:23

Type parameters:

Name
T

Property

Ƭ Property<T, O>: { reference: MANY_TO_ONE | "m:1" } & TypeDef<T> & ManyToOneOptions<T, O> | { reference: ONE_TO_ONE | "1:1" } & TypeDef<T> & OneToOneOptions<T, O> | { reference: ONE_TO_MANY | "1:m" } & TypeDef<T> & OneToManyOptions<T, O> | { reference: MANY_TO_MANY | "m:n" } & TypeDef<T> & ManyToManyOptions<T, O> | { reference: EMBEDDED | "embedded" } & TypeDef<T> & EmbeddedOptions & PropertyOptions<O> | { enum: true } & EnumOptions<O> | TypeDef<T> & PropertyOptions<O>

Defined in packages/core/src/metadata/EntitySchema.ts:14

Type parameters:

Name
T
O

PropertyKey

Ƭ PropertyKey<T, U>: NonFunctionPropertyNames<Omit<T, keyof U>>

Defined in packages/core/src/metadata/EntitySchema.ts:22

Type parameters:

Name
T
U

PropertyOptions

Ƭ PropertyOptions<T>: { columnType?: string ; comment?: string ; customType?: Type<any> ; default?: string | string[] | number | number[] | boolean | null ; defaultRaw?: string ; fieldName?: string ; fieldNames?: string[] ; formula?: string | (alias: string) => string ; hidden?: boolean ; index?: boolean | string ; lazy?: boolean ; length?: number ; name?: string ; nullable?: boolean ; onCreate?: (entity: T) => any ; onUpdate?: (entity: T) => any ; persist?: boolean ; primary?: boolean ; serializedName?: string ; serializedPrimaryKey?: boolean ; serializer?: (value: any) => any ; type?: "string" | "number" | "boolean" | "bigint" | "ObjectId" | string | unknown | bigint | Date | Constructor<Type<any>> | Type<any> ; unique?: boolean | string ; unsigned?: boolean ; version?: boolean }

Defined in packages/core/src/decorators/Property.ts:37

Type parameters:

Name
T

Type declaration:

NameType
columnType?string
comment?string
customType?Type<any>
default?string | string[] | number | number[] | boolean | null
defaultRaw?string
fieldName?string
fieldNames?string[]
formula?string | (alias: string) => string
hidden?boolean
index?boolean | string
lazy?boolean
length?number
name?string
nullable?boolean
onCreate?(entity: T) => any
onUpdate?(entity: T) => any
persist?boolean
primary?boolean
serializedName?string
serializedPrimaryKey?boolean
serializer?(value: any) => any
type?"string" | "number" | "boolean" | "bigint" | "ObjectId" | string | unknown | bigint | Date | Constructor<Type<any>> | Type<any>
unique?boolean | string
unsigned?boolean
version?boolean

QBFilterQuery

Ƭ QBFilterQuery<T>: FilterQuery<T> & Dictionary | FilterQuery<T>

Defined in packages/core/src/typings.ts:69

Type parameters:

NameDefault
Tany

Query

Ƭ Query<T>: string | QueryBuilder | Raw

Defined in packages/core/src/typings.ts:63

Defined in packages/migrations/src/Migration.ts:4

Type parameters:

Name
T

QueryOrderKeys

Ƭ QueryOrderKeys: QueryOrderKeysFlat | QueryOrderMap

Defined in packages/core/src/enums.ts:47


QueryOrderKeysFlat

Ƭ QueryOrderKeysFlat: QueryOrder | QueryOrderNumeric | keyof typeof QueryOrder

Defined in packages/core/src/enums.ts:46


RelationsIn

Ƭ RelationsIn<T>: SubType<T, Collection<any> | Reference<any> | undefined>

Defined in packages/core/src/typings.ts:384

Type parameters:

Name
T

ResultMapper

Ƭ ResultMapper<T>: (result: EntityData<T>) => EntityData<T> | null

Defined in packages/core/src/utils/EntityComparator.ts:8

Type parameters:

Name
T

Scalar

Ƭ Scalar: boolean | number | string | bigint | symbol | Date | RegExp | Buffer | { toHexString: () => string }

Defined in packages/core/src/typings.ts:31


SnapshotGenerator

Ƭ SnapshotGenerator<T>: (entity: T) => EntityData<T>

Defined in packages/core/src/utils/EntityComparator.ts:9

Type parameters:

Name
T

SubType

Ƭ SubType<T, C>: Pick<T, {}[keyof T]>

Defined in packages/core/src/typings.ts:382

Type parameters:

Name
T
C

Transaction

Ƭ Transaction<T>: T

Defined in packages/core/src/connections/Connection.ts:140

Type parameters:

NameDefault
Tany

TypeDef

Ƭ TypeDef<T>: { type: TypeType } | { customType: Type<any> } | { entity: string | () => string | EntityName<T> }

Defined in packages/core/src/metadata/EntitySchema.ts:13

Type parameters:

Name
T

TypeType

Ƭ TypeType: string | NumberConstructor | StringConstructor | BooleanConstructor | DateConstructor | ArrayConstructor | Constructor<Type<any>>

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


UmzugMigration

Ƭ UmzugMigration: { file: string ; name?: string ; path?: string }

Defined in packages/core/src/typings.ts:318

Defined in packages/migrations/src/typings.ts:3

Type declaration:

NameType
filestring
name?string
path?string

Variables

ARRAY_OPERATORS

Const ARRAY_OPERATORS: string[] = ['$overlap', '$contains', '$contained']

Defined in packages/core/src/enums.ts:24


EntityManagerType

Const EntityManagerType: unique symbol = Symbol('EntityManagerType')

Defined in packages/core/src/drivers/IDatabaseDriver.ts:10


EntityRepositoryType

Const EntityRepositoryType: unique symbol = Symbol('EntityRepositoryType')

Defined in packages/core/src/typings.ts:21


ObjectBindingPattern

Const ObjectBindingPattern: unique symbol = Symbol('ObjectBindingPattern')

Defined in packages/core/src/utils/Utils.ts:14


PrimaryKeyType

Const PrimaryKeyType: unique symbol = Symbol('PrimaryKeyType')

Defined in packages/core/src/typings.ts:22


SCALAR_TYPES

Const SCALAR_TYPES: string[] = ['string', 'number', 'boolean', 'Date', 'Buffer', 'RegExp']

Defined in packages/core/src/enums.ts:65


assign

Const assign: assign = EntityAssigner.assign

Defined in packages/core/src/entity/EntityAssigner.ts:151


entityHelperSymbol

Const entityHelperSymbol: unique symbol = Symbol('helper')

Defined in packages/core/src/entity/EntityHelper.ts:12


equalsFn

Const equalsFn: equals = equals

Defined in packages/core/src/utils/Utils.ts:114


validator

Const validator: EntityValidator = new EntityValidator(false)

Defined in packages/core/src/entity/EntityAssigner.ts:10

Functions

AfterCreate

AfterCreate(): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:20

Returns: (Anonymous function)


AfterDelete

AfterDelete(): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:46

Called after deleting entity, but only when providing initialized entity to EM#remove()

Returns: (Anonymous function)


AfterUpdate

AfterUpdate(): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:28

Returns: (Anonymous function)


BeforeCreate

BeforeCreate(): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:16

Returns: (Anonymous function)


BeforeDelete

BeforeDelete(): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:39

Called before deleting entity, but only when providing initialized entity to EM#remove()

Returns: (Anonymous function)


BeforeUpdate

BeforeUpdate(): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:24

Returns: (Anonymous function)


Embeddable

Embeddable(): (Anonymous function)

Defined in packages/core/src/decorators/Embeddable.ts:4

Returns: (Anonymous function)


Embedded

Embedded(options?: EmbeddedOptions | () => AnyEntity): (Anonymous function)

Defined in packages/core/src/decorators/Embedded.ts:6

Parameters:

NameTypeDefault value
optionsEmbeddedOptions | () => AnyEntity{}

Returns: (Anonymous function)


Entity

Entity(options?: EntityOptions<any>): (Anonymous function)

Defined in packages/core/src/decorators/Entity.ts:6

Parameters:

NameTypeDefault value
optionsEntityOptions<any>{}

Returns: (Anonymous function)


Enum

Enum(options?: EnumOptions<AnyEntity> | () => Dictionary): (Anonymous function)

Defined in packages/core/src/decorators/Enum.ts:7

Parameters:

NameTypeDefault value
optionsEnumOptions<AnyEntity> | () => Dictionary{}

Returns: (Anonymous function)


Filter

Filter<T>(options: FilterDef<T>): (Anonymous function)

Defined in packages/core/src/decorators/Filter.ts:4

Type parameters:

Name
T

Parameters:

NameType
optionsFilterDef<T>

Returns: (Anonymous function)


Formula

Formula(formula: string | (alias: string) => string): (Anonymous function)

Defined in packages/core/src/decorators/Formula.ts:6

Parameters:

NameType
formulastring | (alias: string) => string

Returns: (Anonymous function)


Index

Index<T>(options?: IndexOptions<T>): (Anonymous function)

Defined in packages/core/src/decorators/Indexed.ts:20

Type parameters:

Name
T

Parameters:

NameTypeDefault value
optionsIndexOptions<T>{}

Returns: (Anonymous function)


ManyToMany

ManyToMany<T, O>(entity?: ManyToManyOptions<T, O> | string | () => EntityName<T>, mappedBy?: string & keyof T | (e: T) => any, options?: Partial<ManyToManyOptions<T, O>>): (Anonymous function)

Defined in packages/core/src/decorators/ManyToMany.ts:7

Type parameters:

Name
T
O

Parameters:

NameTypeDefault value
entity?ManyToManyOptions<T, O> | string | () => EntityName<T>-
mappedBy?string & keyof T | (e: T) => any-
optionsPartial<ManyToManyOptions<T, O>>{}

Returns: (Anonymous function)


ManyToOne

ManyToOne<T, O>(entity?: ManyToOneOptions<T, O> | string | (e?: any) => EntityName<T>, options?: Partial<ManyToOneOptions<T, O>>): (Anonymous function)

Defined in packages/core/src/decorators/ManyToOne.ts:7

Type parameters:

Name
T
O

Parameters:

NameTypeDefault value
entityManyToOneOptions<T, O> | string | (e?: any) => EntityName<T>{}
optionsPartial<ManyToOneOptions<T, O>>{}

Returns: (Anonymous function)


OnInit

OnInit(): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:32

Returns: (Anonymous function)


OneToMany

OneToMany<T, O>(entity: string | (e?: any) => EntityName<T>, mappedBy: string & keyof T | (e: T) => any, options?: Partial<OneToManyOptions<T, O>>): function

Defined in packages/core/src/decorators/OneToMany.ts:24

Type parameters:

Name
T
O

Parameters:

NameType
entitystring | (e?: any) => EntityName<T>
mappedBystring & keyof T | (e: T) => any
options?Partial<OneToManyOptions<T, O>>

Returns: function

OneToMany<T, O>(options: OneToManyOptions<T, O>): function

Defined in packages/core/src/decorators/OneToMany.ts:29

Type parameters:

Name
T
O

Parameters:

NameType
optionsOneToManyOptions<T, O>

Returns: function


OneToOne

OneToOne<T, O>(entity?: OneToOneOptions<T, O> | string | (e?: any) => EntityName<T>, mappedBy?: string & keyof T | (e: T) => any, options?: Partial<OneToOneOptions<T, O>>): (Anonymous function)

Defined in packages/core/src/decorators/OneToOne.ts:5

Type parameters:

Name
T
O

Parameters:

NameTypeDefault value
entity?OneToOneOptions<T, O> | string | (e?: any) => EntityName<T>-
mappedBy?string & keyof T | (e: T) => any-
optionsPartial<OneToOneOptions<T, O>>{}

Returns: (Anonymous function)


PrimaryKey

PrimaryKey<T>(options?: PrimaryKeyOptions<T>): (Anonymous function)

Defined in packages/core/src/decorators/PrimaryKey.ts:19

Type parameters:

Name
T

Parameters:

NameTypeDefault value
optionsPrimaryKeyOptions<T>{}

Returns: (Anonymous function)


Property

Property<T>(options?: PropertyOptions<T>): (Anonymous function)

Defined in packages/core/src/decorators/Property.ts:7

Type parameters:

Name
T

Parameters:

NameTypeDefault value
optionsPropertyOptions<T>{}

Returns: (Anonymous function)


Repository

Repository<T>(entity: EntityClass<T>): (Anonymous function)

Defined in packages/core/src/decorators/Repository.ts:5

Type parameters:

NameType
TAnyEntity

Parameters:

NameType
entityEntityClass<T>

Returns: (Anonymous function)


SerializedPrimaryKey

SerializedPrimaryKey<T>(options?: SerializedPrimaryKeyOptions<T>): (Anonymous function)

Defined in packages/core/src/decorators/PrimaryKey.ts:23

Type parameters:

Name
T

Parameters:

NameTypeDefault value
optionsSerializedPrimaryKeyOptions<T>{}

Returns: (Anonymous function)


Subscriber

Subscriber(): (Anonymous function)

Defined in packages/core/src/decorators/Subscriber.ts:5

Returns: (Anonymous function)


Unique

Unique<T>(options?: UniqueOptions<T>): (Anonymous function)

Defined in packages/core/src/decorators/Indexed.ts:24

Type parameters:

Name
T

Parameters:

NameTypeDefault value
optionsUniqueOptions<T>{}

Returns: (Anonymous function)


compareArrays

compareArrays(a: any[], b: any[]): boolean

Defined in packages/core/src/utils/Utils.ts:58

Parameters:

NameType
aany[]
bany[]

Returns: boolean


compareBuffers

compareBuffers(a: Buffer, b: Buffer): boolean

Defined in packages/core/src/utils/Utils.ts:75

Parameters:

NameType
aBuffer
bBuffer

Returns: boolean


compareObjects

compareObjects(a: any, b: any): boolean

Defined in packages/core/src/utils/Utils.ts:16

Parameters:

NameType
aany
bany

Returns: boolean


createDecorator

createDecorator<T>(options: PrimaryKeyOptions<T> | SerializedPrimaryKeyOptions<T>, serialized: boolean): (Anonymous function)

Defined in packages/core/src/decorators/PrimaryKey.ts:7

Type parameters:

Name
T

Parameters:

NameType
optionsPrimaryKeyOptions<T> | SerializedPrimaryKeyOptions<T>
serializedboolean

Returns: (Anonymous function)


createOneToDecorator

createOneToDecorator<T, O>(entity: OneToManyOptions<T, O> | string | (e?: any) => EntityName<T>, mappedBy: string & keyof T | (e: T) => any | undefined, options: Partial<OneToManyOptions<T, O>>, reference: ReferenceType): (Anonymous function)

Defined in packages/core/src/decorators/OneToMany.ts:7

Type parameters:

Name
T
O

Parameters:

NameType
entityOneToManyOptions<T, O> | string | (e?: any) => EntityName<T>
mappedBystring & keyof T | (e: T) => any | undefined
optionsPartial<OneToManyOptions<T, O>>
referenceReferenceType

Returns: (Anonymous function)


equals

equals(a: any, b: any): boolean

Defined in packages/core/src/utils/Utils.ts:94

Checks if arguments are deeply (but not strictly) equal.

Parameters:

NameType
aany
bany

Returns: boolean


expr

Constexpr(sql: string): string

Defined in packages/core/src/utils/QueryHelper.ts:220

Parameters:

NameType
sqlstring

Returns: string


hook

hook(type: EventType): (Anonymous function)

Defined in packages/core/src/decorators/hooks.ts:4

Parameters:

NameType
typeEventType

Returns: (Anonymous function)


mapHydrator

mapHydrator<T>(items: T[] | undefined, hydrate: (i: string) => T): function

Defined in packages/core/src/types/EnumArrayType.ts:6

Type parameters:

Name
T

Parameters:

NameType
itemsT[] | undefined
hydrate(i: string) => T

Returns: function


wrap

wrap<T, PK>(entity: T, preferHelper: true): IWrappedEntityInternal<T, PK>

Defined in packages/core/src/entity/wrap.ts:6

returns WrappedEntity instance associated with this entity. This includes all the internal properties like __meta or __em.

Type parameters:

NameType
T-
PKkeyof T

Parameters:

NameType
entityT
preferHelpertrue

Returns: IWrappedEntityInternal<T, PK>

wrap<T, PK>(entity: T, preferHelper?: false): IWrappedEntity<T, PK>

Defined in packages/core/src/entity/wrap.ts:11

wraps entity type with WrappedEntity internal properties and helpers like init/isInitialized/populated/toJSON

Type parameters:

NameType
T-
PKkeyof T

Parameters:

NameType
entityT
preferHelper?false

Returns: IWrappedEntity<T, PK>

Object literals

MonkeyPatchable

Const MonkeyPatchable: object

Defined in packages/knex/src/MonkeyPatchable.ts:14

Properties:

NameTypeValue
MySqlDialectanyany
PostgresDialectTableCompileranyany
Sqlite3Dialectanyany
TableCompileranyany
Last updated on by Martin Adámek