跳到主要内容

@nest-boot/mikro-orm

Classes

EntityService

Defined in: packages/mikro-orm/src/services/entity.service.ts:53

Type Parameters

Type Parameter
Entity extends IdEntity

Constructors

Constructor
new EntityService<Entity>(
entityClass,
em,
options?): EntityService<Entity>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:54

Parameters
ParameterType
entityClassType<Entity>
emEntityManager
options?EntityServiceOptions<Entity>
Returns

EntityService<Entity>

Properties

em
protected readonly em: EntityManager;

Defined in: packages/mikro-orm/src/services/entity.service.ts:56

entityClass
protected readonly entityClass: Type<Entity>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:55

options?
protected readonly optional options: EntityServiceOptions<Entity>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:57

Methods

chunkById()
chunkById<Hint, Fields, Excludes>(
where,
options,
callback): Promise<EntityService<Entity>>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:304

Type Parameters
Type Parameter
Hint extends string
Fields extends string
Excludes extends string
Parameters
ParameterType
whereExpandQuery<Entity>
optionsChunkByIdOptions<Entity, Hint, Fields, Excludes>
callback(entities) => Promise<void>
Returns

Promise<EntityService<Entity>>

count()
count<Hint>(where, options?): Promise<number>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:257

Type Parameters
Type Parameter
Hint extends string
Parameters
ParameterType
whereFilterQuery<NoInfer<Entity>>
options?CountOptions<Entity, Hint>
Returns

Promise<number>

create()
create(data): Promise<Entity>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:209

Parameters
ParameterType
dataRequiredEntityData<Entity>
Returns

Promise<Entity>

findAll()
findAll<Hint, Fields, Excludes>(where, options?): Promise<Loaded<Entity, Hint, Fields, Excludes>[]>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:242

Type Parameters
Type Parameter
Hint extends string
Fields extends string
Excludes extends string
Parameters
ParameterType
whereFilterQuery<NoInfer<Entity>>
options?FindOptions<Entity, Hint, Fields, Excludes>
Returns

Promise<Loaded<Entity, Hint, Fields, Excludes>[]>

findOne()
findOne(idOrEntityOrWhere): Promise<Loaded<Entity> | null>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:213

Parameters
ParameterType
idOrEntityOrWhere| IdOrEntity<Entity> | FilterQuery<NoInfer<Entity>>
Returns

Promise<Loaded<Entity> | null>

findOneOrFail()
findOneOrFail(idOrEntityOrWhere): Promise<Loaded<Entity>>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:228

Parameters
ParameterType
idOrEntityOrWhereIdOrEntity<Entity> | FilterQuery<Entity>
Returns

Promise<Loaded<Entity>>

remove()
remove(idOrEntity, softDelete): Promise<Entity>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:288

Parameters
ParameterType
idOrEntityIdOrEntity<Entity>
softDeleteboolean
Returns

Promise<Entity>

update()
update<Naked, Convert, Data>(
idOrEntity,
data,
options?): Promise<Entity>;

Defined in: packages/mikro-orm/src/services/entity.service.ts:264

Type Parameters
Type Parameter
Naked extends IdEntity<string | number | bigint>
Convert extends boolean
Data extends EntityData<Naked, Convert> | Partial<EntityDTO<Naked>>
Parameters
ParameterType
idOrEntityIdOrEntity<Entity>
dataData & IsSubset<EntityData<Naked, Convert>, Data>
options?AssignOptions<Convert>
Returns

Promise<Entity>


MikroOrmMiddleware

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.d.ts:3

Implements

  • NestMiddleware

Constructors

Constructor
new MikroOrmMiddleware(orm): MikroOrmMiddleware;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.d.ts:5

Parameters
ParameterType
ormMikroORM
Returns

MikroOrmMiddleware

Methods

use()
use(
req,
res,
next): void;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.d.ts:6

Parameters
ParameterType
requnknown
resunknown
next(...args) => void
Returns

void

Implementation of
NestMiddleware.use

MikroOrmModule

Defined in: packages/mikro-orm/src/mikro-orm.module.ts:44

Extends

  • ConfigurableModuleClass

Implements

  • OnModuleInit

Indexable

[key: string]: any

Constructors

Constructor
new MikroOrmModule(orm): MikroOrmModule;

Defined in: packages/mikro-orm/src/mikro-orm.module.ts:48

Parameters
ParameterType
ormMikroORM
Returns

MikroOrmModule

Overrides
ConfigurableModuleClass.constructor

Properties

forRoot()
static forRoot: (options) => DynamicModule;
Parameters
ParameterType
optionsMikroOrmModuleOptions & Partial<{ }>
Returns

DynamicModule

Inherited from
ConfigurableModuleClass.forRoot
forRootAsync()
static forRootAsync: (options) => DynamicModule;
Parameters
ParameterType
optionsConfigurableModuleAsyncOptions<MikroOrmModuleOptions, "create"> & Partial<{ }>
Returns

DynamicModule

Inherited from
ConfigurableModuleClass.forRootAsync

Methods

onModuleInit()
onModuleInit(): void;

Defined in: packages/mikro-orm/src/mikro-orm.module.ts:69

Returns

void

Implementation of
OnModuleInit.onModuleInit
clearStorage()
static clearStorage(...args): void;

Defined in: packages/mikro-orm/src/mikro-orm.module.ts:62

Parameters
ParameterType
...args[string]
Returns

void

forFeature()
static forFeature(...args): DynamicModule;

Defined in: packages/mikro-orm/src/mikro-orm.module.ts:52

Parameters
ParameterType
...args[ | EntityName<Partial<any>>[] | MikroOrmModuleFeatureOptions, string]
Returns

DynamicModule

forMiddleware()
static forMiddleware(...args): DynamicModule;

Defined in: packages/mikro-orm/src/mikro-orm.module.ts:56

Parameters
ParameterType
...args[MikroOrmMiddlewareModuleOptions]
Returns

DynamicModule


MultipleMikroOrmMiddleware

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.d.ts:3

Implements

  • NestMiddleware

Constructors

Constructor
new MultipleMikroOrmMiddleware(orm): MultipleMikroOrmMiddleware;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.d.ts:5

Parameters
ParameterType
ormMikroORM<IDatabaseDriver<Connection>, EntityManager<IDatabaseDriver<Connection>>>[]
Returns

MultipleMikroOrmMiddleware

Methods

use()
use(
req,
res,
next): void;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.d.ts:6

Parameters
ParameterType
requnknown
resunknown
next(...args) => void
Returns

void

Implementation of
NestMiddleware.use

VectorType

Defined in: packages/mikro-orm/src/property-types/vector.type.ts:4

Extends

  • VectorType

Constructors

Constructor
new VectorType(dimensions?): VectorType;

Defined in: packages/mikro-orm/src/property-types/vector.type.ts:5

Parameters
ParameterType
dimensions?number
Returns

VectorType

Overrides
BaseVectorType.constructor

Properties

meta?
optional meta: EntityMetadata<any>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:18

Inherited from
BaseVectorType.meta
platform?
optional platform: Platform;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:17

Inherited from
BaseVectorType.platform
prop?
optional prop: EntityProperty<any, any>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:19

Inherited from
BaseVectorType.prop

Accessors

name
Get Signature
get name(): string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:46

Returns

string

Inherited from
BaseVectorType.name
runtimeType
Get Signature
get runtimeType(): string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:45

Returns

string

Inherited from
BaseVectorType.runtimeType

Methods

compareAsType()
compareAsType(): string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:40

How should the raw database values be compared? Used in EntityComparator. Possible values: string | number | bigint | boolean | date | any | buffer | array

Returns

string

Inherited from
BaseVectorType.compareAsType
compareValues()?
optional compareValues(a, b): boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:44

Allows to override the internal comparison logic.

Parameters
ParameterType
astring
bstring
Returns

boolean

Inherited from
BaseVectorType.compareValues
convertToDatabaseValue()
convertToDatabaseValue(value, platform): any;

Defined in: node_modules/.pnpm/pgvector@0.2.1/node_modules/pgvector/types/mikro-orm/vector.d.ts:3

Converts a value from its JS representation to its database representation of this type.

Parameters
ParameterType
valueany
platformany
Returns

any

Inherited from
BaseVectorType.convertToDatabaseValue
convertToDatabaseValueSQL()?
optional convertToDatabaseValueSQL(key, platform): string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:31

Converts a value from its JS representation to its database representation of this type.

Parameters
ParameterType
keystring
platformPlatform
Returns

string

Inherited from
BaseVectorType.convertToDatabaseValueSQL
convertToJSValue()
convertToJSValue(value, platform): any;

Defined in: node_modules/.pnpm/pgvector@0.2.1/node_modules/pgvector/types/mikro-orm/vector.d.ts:4

Converts a value from its database representation to its JS representation of this type.

Parameters
ParameterType
valueany
platformany
Returns

any

Inherited from
BaseVectorType.convertToJSValue
convertToJSValueSQL()?
optional convertToJSValueSQL(key, platform): string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:35

Modifies the SQL expression (identifier, parameter) to convert to a JS value.

Parameters
ParameterType
keystring
platformPlatform
Returns

string

Inherited from
BaseVectorType.convertToJSValueSQL
ensureComparable()
ensureComparable<T>(meta, prop): boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:52

When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the convertToDatabaseValue result. This allows to disable the additional conversion in case you know it is not needed.

Type Parameters
Type Parameter
T extends object
Parameters
ParameterType
metaEntityMetadata<T>
propEntityProperty<T>
Returns

boolean

Inherited from
BaseVectorType.ensureComparable
getColumnType()
getColumnType(prop, platform): any;

Defined in: packages/mikro-orm/src/property-types/vector.type.ts:9

Parameters
ParameterType
propEntityProperty
platformPlatform
Returns

any

Overrides
BaseVectorType.getColumnType
getDefaultLength()?
optional getDefaultLength(platform): number;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:76

Get the default length for values of this type

When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value.

When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata.

Parameters
ParameterTypeDescription
platformPlatformThe platform the default will be used for.
Returns

number

The default value for the given platform.

Inherited from
BaseVectorType.getDefaultLength
toJSON()
toJSON(value, platform): string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:57

Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value.

Parameters
ParameterType
valuestring
platformPlatform
Returns

string

Inherited from
BaseVectorType.toJSON
getType()
static getType<JSType, DBType, TypeClass>(cls): InstanceType<TypeClass>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:77

Type Parameters
Type Parameter
JSType
DBType
TypeClass extends Constructor<Type<JSType, DBType>>
Parameters
ParameterType
clsTypeClass
Returns

InstanceType<TypeClass>

Inherited from
BaseVectorType.getType
isMappedType()
static isMappedType(data): data is Type<any, any>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/types/Type.d.ts:81

Checks whether the argument is instance of Type.

Parameters
ParameterType
dataany
Returns

data is Type<any, any>

Inherited from
BaseVectorType.isMappedType

Interfaces

EntityServiceOptions

Defined in: packages/mikro-orm/src/services/entity.service.ts:49

Type Parameters

Type Parameter
Entity extends IdEntity

Properties

softDeleteKey?
optional softDeleteKey: keyof Entity;

Defined in: packages/mikro-orm/src/services/entity.service.ts:50


IdEntity

Defined in: packages/mikro-orm/src/interfaces/id-entity.interface.ts:1

Type Parameters

Type Parameter
ID

Properties

id
id: ID;

Defined in: packages/mikro-orm/src/interfaces/id-entity.interface.ts:2


MikroOrmModuleAsyncOptions

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:66

Extends

  • Pick<ModuleMetadata, "imports" | "providers">.MikroOrmNestScopeOptions

Type Parameters

Type Parameter
D extends IDatabaseDriver

Properties

contextName?
optional contextName: string;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:74

The context name (database connection) to specify for this instance.

When injecting repositories or entity manager instances, this context name will need to be specified where there are multiple datbaase connections.

See

MikroOrm - NestJS - Multiple Database Connections

driver?
optional driver: Constructor<D>;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:78

forkOptions?
optional forkOptions: ForkOptions;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:24

An optional configuration object to use when forking the Event Manager if it is configured with a scope other than Scope.DEFAULT

This configuration option has no effect when the scope is set to Scope.DEFAULT.

https://mikro-orm.io/api/core/interface/ForkOptions

Inherited from
MikroOrmNestScopeOptions.forkOptions
imports?
optional imports: (
| DynamicModule
| Type<any>
| Promise<DynamicModule>
| ForwardReference<any>)[];

Defined in: node_modules/.pnpm/@nestjs+common@11.1.9/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts:18

Optional list of imported modules that export the providers which are required in this module.

Inherited from
Pick.imports
inject?
optional inject: any[];

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:79

providers?
optional providers: Provider[];

Defined in: node_modules/.pnpm/@nestjs+common@11.1.9/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts:28

Optional list of providers that will be instantiated by the Nest injector and that may be shared at least across this module.

Inherited from
Pick.providers
scope?
optional scope: Scope;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:16

The NestJS provider scope to use for the EntityManager (and any subsequent downstream records).

This scope will also impact the scope of Entity Repositories as they depend on the EntityManager.

See

NestJS Scope Hierarchy

Inherited from
MikroOrmNestScopeOptions.scope
useClass?
optional useClass: Type<MikroOrmOptionsFactory<D>>;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:76

useExisting?
optional useExisting: Type<MikroOrmOptionsFactory<D>>;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:75

useFactory()?
optional useFactory: (...args) => 
| Omit<MikroOrmModuleOptions<D>, "contextName">
| Promise<Omit<MikroOrmModuleOptions<D>, "contextName">>;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:77

Parameters
ParameterType
...argsany[]
Returns

| Omit<MikroOrmModuleOptions<D>, "contextName"> | Promise<Omit<MikroOrmModuleOptions<D>, "contextName">>


MikroOrmModuleFeatureOptions

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:47

Properties

contextName?
optional contextName: string;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:59

The context (database connection) to use for the entity repository.

See

MikroOrm - NestJS - Multiple Database Connections

entities?
optional entities: EntityName<Partial<any>>[];

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:53

The entities to provide an EntityRepository for.

See

MikroOrm - NestJS - Repositories


MikroOrmModuleSyncOptions

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:64

Extends

  • MikroOrmModuleOptions.MikroOrmNestScopeOptions

Properties

allowGlobalContext?
optional allowGlobalContext: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:381

Inherited from
MikroOrmModuleOptions.allowGlobalContext
assign?
optional assign: AssignOptions<boolean>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:351

Inherited from
MikroOrmModuleOptions.assign
autoJoinOneToOneOwner?
optional autoJoinOneToOneOwner: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:341

Inherited from
MikroOrmModuleOptions.autoJoinOneToOneOwner
autoJoinRefsForFilters?
optional autoJoinRefsForFilters: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:342

Inherited from
MikroOrmModuleOptions.autoJoinRefsForFilters
autoLoadEntities?
optional autoLoadEntities: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:45

Specifies whether or not to automatically load the entities based on MikroOrmModule.forFeature invocations.

See

MikroOrm - NestJS - Load Entities Automatically

Default
false
Inherited from
MikroOrmModuleOptions.autoLoadEntities
baseDir?
optional baseDir: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:399

Inherited from
MikroOrmModuleOptions.baseDir
batchSize?
optional batchSize: number;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:367

Inherited from
MikroOrmModuleOptions.batchSize
charset?
optional charset: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:254

Inherited from
MikroOrmModuleOptions.charset
clientUrl?
optional clientUrl: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:249

Inherited from
MikroOrmModuleOptions.clientUrl
collate?
optional collate: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:255

Inherited from
MikroOrmModuleOptions.collate
colors?
optional colors: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:384

Inherited from
MikroOrmModuleOptions.colors
connect?
optional connect: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:337

Inherited from
MikroOrmModuleOptions.connect
context()?
optional context: (name) => EntityManager<IDatabaseDriver<Connection>> | undefined;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:379

Parameters
ParameterType
namestring
Returns

EntityManager<IDatabaseDriver<Connection>> | undefined

Inherited from
MikroOrmModuleOptions.context
contextName?
optional contextName: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:380

Inherited from
MikroOrmModuleOptions.contextName
dataloader?
optional dataloader: boolean | DataloaderType;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:370

Inherited from
MikroOrmModuleOptions.dataloader
dbName?
optional dbName: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:246

Inherited from
MikroOrmModuleOptions.dbName
debug?
optional debug: boolean | LoggerNamespace[];

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:388

Inherited from
MikroOrmModuleOptions.debug
disableIdentityMap?
optional disableIdentityMap: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:382

Inherited from
MikroOrmModuleOptions.disableIdentityMap
disableTransactions?
optional disableTransactions: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:336

Inherited from
MikroOrmModuleOptions.disableTransactions
discovery?
optional discovery: MetadataDiscoveryOptions;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:328

Inherited from
MikroOrmModuleOptions.discovery
driver()?
optional driver: (config) => IDatabaseDriver;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:329

Parameters
ParameterType
configConfiguration
Returns

IDatabaseDriver

Inherited from
MikroOrmModuleOptions.driver
driverOptions?
optional driverOptions: Dictionary;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:258

Inherited from
MikroOrmModuleOptions.driverOptions
dynamicImportProvider()?
optional dynamicImportProvider: (id) => Promise<unknown>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:436

Parameters
ParameterType
idstring
Returns

Promise<unknown>

Inherited from
MikroOrmModuleOptions.dynamicImportProvider
embeddables?
optional embeddables: {
prefixMode: EmbeddedPrefixMode;
};

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:409

prefixMode
prefixMode: EmbeddedPrefixMode;
Inherited from
MikroOrmModuleOptions.embeddables
ensureDatabase?
optional ensureDatabase: boolean | EnsureDatabaseOptions;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:363

Inherited from
MikroOrmModuleOptions.ensureDatabase
ensureIndexes?
optional ensureIndexes: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:364

Inherited from
MikroOrmModuleOptions.ensureIndexes
entities?
optional entities: (
| string
| EntityClass<Partial<any>>
| EntityClassGroup<Partial<any>>
| EntitySchema<any, never>)[];

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:319

Inherited from
MikroOrmModuleOptions.entities
entitiesTs?
optional entitiesTs: (
| string
| EntityClass<Partial<any>>
| EntityClassGroup<Partial<any>>
| EntitySchema<any, never>)[];

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:320

Inherited from
MikroOrmModuleOptions.entitiesTs
entityGenerator?
optional entityGenerator: GenerateOptions;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:412

Inherited from
MikroOrmModuleOptions.entityGenerator
entityManager?
optional entityManager: Constructor<EntityManager<IDatabaseDriver<Connection>>>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:374

Inherited from
MikroOrmModuleOptions.entityManager
entityRepository?
optional entityRepository: EntityClass<EntityRepository<any>>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:373

Inherited from
MikroOrmModuleOptions.entityRepository
extensions?
optional extensions: {
register: (orm) => void;
}[];

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:321

register()
register: (orm) => void;
Parameters
ParameterType
ormMikroORM
Returns

void

Inherited from
MikroOrmModuleOptions.extensions
filters?
optional filters: Dictionary<{
name?: string;
} & Omit<FilterDef, "name">>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:325

Inherited from
MikroOrmModuleOptions.filters
filtersOnRelations?
optional filtersOnRelations: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:343

Inherited from
MikroOrmModuleOptions.filtersOnRelations
findExactlyOneOrFailHandler()?
optional findExactlyOneOrFailHandler: (entityName, where) => Error;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:387

Parameters
ParameterType
entityNamestring
whereDictionary | IPrimaryKeyValue
Returns

Error

Inherited from
MikroOrmModuleOptions.findExactlyOneOrFailHandler
findOneOrFailHandler()?
optional findOneOrFailHandler: (entityName, where) => Error;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:386

Parameters
ParameterType
entityNamestring
whereDictionary | IPrimaryKeyValue
Returns

Error

Inherited from
MikroOrmModuleOptions.findOneOrFailHandler
flushMode?
optional flushMode: FlushMode | "commit" | "auto" | "always";

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:372

Inherited from
MikroOrmModuleOptions.flushMode
forceEntityConstructor?
optional forceEntityConstructor: boolean | (string | Constructor<Partial<any>>)[];

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:354

Inherited from
MikroOrmModuleOptions.forceEntityConstructor
forceUndefined?
optional forceUndefined: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:355

Inherited from
MikroOrmModuleOptions.forceUndefined
forceUtcTimezone?
optional forceUtcTimezone: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:361

Inherited from
MikroOrmModuleOptions.forceUtcTimezone
forkOptions?
optional forkOptions: ForkOptions;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:24

An optional configuration object to use when forking the Event Manager if it is configured with a scope other than Scope.DEFAULT

This configuration option has no effect when the scope is set to Scope.DEFAULT.

https://mikro-orm.io/api/core/interface/ForkOptions

Inherited from
MikroOrmNestScopeOptions.forkOptions
forRoutesPath?
optional forRoutesPath: string;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:34

Routes to apply the middleware.

For Fastify, the middleware applies to all routes using (.*).

For all other frameworks including Express, the middleware applies to all routes using *.

Inherited from
MikroOrmModuleOptions.forRoutesPath
hashAlgorithm?
optional hashAlgorithm: "md5" | "sha256";

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:435

Inherited from
MikroOrmModuleOptions.hashAlgorithm
highlighter?
optional highlighter: Highlighter;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:390

Inherited from
MikroOrmModuleOptions.highlighter
host?
optional host: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:250

Inherited from
MikroOrmModuleOptions.host
hydrator?
optional hydrator: HydratorConstructor;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:368

Inherited from
MikroOrmModuleOptions.hydrator
ignoreDeprecations?
optional ignoreDeprecations: boolean | string[];

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:389

Inherited from
MikroOrmModuleOptions.ignoreDeprecations
ignoreUndefinedInQuery?
optional ignoreUndefinedInQuery: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:339

Inherited from
MikroOrmModuleOptions.ignoreUndefinedInQuery
implicitTransactions?
optional implicitTransactions: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:335

Inherited from
MikroOrmModuleOptions.implicitTransactions
loadStrategy?
optional loadStrategy: LoadStrategy | "select-in" | "joined" | "balanced";

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:369

Inherited from
MikroOrmModuleOptions.loadStrategy
logger()?
optional logger: (message) => void;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:383

Parameters
ParameterType
messagestring
Returns

void

Inherited from
MikroOrmModuleOptions.logger
loggerFactory()?
optional loggerFactory: (options) => Logger;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:385

Parameters
ParameterType
optionsLoggerOptions
Returns

Logger

Inherited from
MikroOrmModuleOptions.loggerFactory
metadataCache?
optional metadataCache: {
adapter?: (...params) => SyncCacheAdapter;
combined?: string | boolean;
enabled?: boolean;
options?: Dictionary;
pretty?: boolean;
};

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:413

adapter()?
optional adapter: (...params) => SyncCacheAdapter;
Parameters
ParameterType
...paramsany[]
Returns

SyncCacheAdapter

combined?
optional combined: string | boolean;
enabled?
optional enabled: boolean;
options?
optional options: Dictionary;
pretty?
optional pretty: boolean;
Inherited from
MikroOrmModuleOptions.metadataCache
metadataProvider()?
optional metadataProvider: (config) => MetadataProvider;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:430

Parameters
ParameterType
configConfiguration
Returns

MetadataProvider

Inherited from
MikroOrmModuleOptions.metadataProvider
migrations?
optional migrations: MigrationsOptions;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:400

Inherited from
MikroOrmModuleOptions.migrations
multipleStatements?
optional multipleStatements: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:256

Inherited from
MikroOrmModuleOptions.multipleStatements
name?
optional name: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:248

Inherited from
MikroOrmModuleOptions.name
namingStrategy()?
optional namingStrategy: () => NamingStrategy;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:332

Returns

NamingStrategy

Inherited from
MikroOrmModuleOptions.namingStrategy
onQuery()?
optional onQuery: (sql, params) => string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:340

Parameters
ParameterType
sqlstring
paramsunknown[]
Returns

string

Inherited from
MikroOrmModuleOptions.onQuery
password?
optional password: 
| string
| () => MaybePromise<string> | MaybePromise<DynamicPassword>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:253

Inherited from
MikroOrmModuleOptions.password
persistOnCreate?
optional persistOnCreate: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:352

Inherited from
MikroOrmModuleOptions.persistOnCreate
pool?
optional pool: PoolConfig;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:257

Inherited from
MikroOrmModuleOptions.pool
populateAfterFlush?
optional populateAfterFlush: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:345

Inherited from
MikroOrmModuleOptions.populateAfterFlush
populateWhere?
optional populateWhere: PopulateHint | "infer" | "all";

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:371

Inherited from
MikroOrmModuleOptions.populateWhere
port?
optional port: number;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:251

Inherited from
MikroOrmModuleOptions.port
preferReadReplicas?
optional preferReadReplicas: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:434

Inherited from
MikroOrmModuleOptions.preferReadReplicas
preferTs?
optional preferTs: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:396

Using this option, you can force the ORM to use the TS options regardless of whether the TypeScript support is detected or not. This effectively means using entitiesTs for discovery and pathTs for migrations and seeders. Should be used only for tests and stay disabled for production builds.

Inherited from
MikroOrmModuleOptions.preferTs
processOnCreateHooksEarly?
optional processOnCreateHooksEarly: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:360

Property onCreate hooks are normally executed during flush operation. With this option, they will be processed early inside em.create() method.

Inherited from
MikroOrmModuleOptions.processOnCreateHooksEarly
propagationOnPrototype?
optional propagationOnPrototype: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:344

Inherited from
MikroOrmModuleOptions.propagationOnPrototype
registerRequestContext?
optional registerRequestContext: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:37

Inherited from
MikroOrmModuleOptions.registerRequestContext
replicas?
optional replicas: ConnectionOptions[];

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:375

Inherited from
MikroOrmModuleOptions.replicas
resultCache?
optional resultCache: {
adapter?: (...params) => CacheAdapter;
expiration?: number;
global?: number | boolean | [string, number];
options?: Dictionary;
};

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:422

adapter()?
optional adapter: (...params) => CacheAdapter;
Parameters
ParameterType
...paramsany[]
Returns

CacheAdapter

expiration?
optional expiration: number;
global?
optional global: number | boolean | [string, number];
options?
optional options: Dictionary;
Inherited from
MikroOrmModuleOptions.resultCache
schema?
optional schema: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:247

Inherited from
MikroOrmModuleOptions.schema
schemaGenerator?
optional schemaGenerator: {
createForeignKeyConstraints?: boolean;
disableForeignKeys?: boolean;
ignoreSchema?: string[];
managementDbName?: string;
skipColumns?: Dictionary<(string | RegExp)[]>;
skipTables?: (string | RegExp)[];
};

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:401

createForeignKeyConstraints?
optional createForeignKeyConstraints: boolean;
disableForeignKeys?
optional disableForeignKeys: boolean;
ignoreSchema?
optional ignoreSchema: string[];
managementDbName?
optional managementDbName: string;
skipColumns?
optional skipColumns: Dictionary<(string | RegExp)[]>;
skipTables?
optional skipTables: (string | RegExp)[];
Inherited from
MikroOrmModuleOptions.schemaGenerator
scope?
optional scope: Scope;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:16

The NestJS provider scope to use for the EntityManager (and any subsequent downstream records).

This scope will also impact the scope of Entity Repositories as they depend on the EntityManager.

See

NestJS Scope Hierarchy

Inherited from
MikroOrmNestScopeOptions.scope
seeder?
optional seeder: SeederOptions;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:433

Inherited from
MikroOrmModuleOptions.seeder
serialization?
optional serialization: {
forceObject?: boolean;
includePrimaryKeys?: boolean;
};

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:346

forceObject?
optional forceObject: boolean;

Enforce unpopulated references to be returned as objects, e.g. { author: { id: 1 } } instead of { author: 1 }.

includePrimaryKeys?
optional includePrimaryKeys: boolean;
Inherited from
MikroOrmModuleOptions.serialization
strict?
optional strict: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:376

Inherited from
MikroOrmModuleOptions.strict
subscribers?
optional subscribers: Iterable<EventSubscriber<any> | Constructor<EventSubscriber<any>>, any, any>;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:324

Inherited from
MikroOrmModuleOptions.subscribers
timezone?
optional timezone: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:362

Inherited from
MikroOrmModuleOptions.timezone
tsNode?
optional tsNode: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:398

Deprecated

use preferTs instead

Inherited from
MikroOrmModuleOptions.tsNode
upsertManaged?
optional upsertManaged: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:353

Inherited from
MikroOrmModuleOptions.upsertManaged
useBatchInserts?
optional useBatchInserts: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:365

Inherited from
MikroOrmModuleOptions.useBatchInserts
useBatchUpdates?
optional useBatchUpdates: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:366

Inherited from
MikroOrmModuleOptions.useBatchUpdates
user?
optional user: string;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:252

Inherited from
MikroOrmModuleOptions.user
validate?
optional validate: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:377

Inherited from
MikroOrmModuleOptions.validate
validateRequired?
optional validateRequired: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:378

Inherited from
MikroOrmModuleOptions.validateRequired
verbose?
optional verbose: boolean;

Defined in: node_modules/.pnpm/@mikro-orm+core@6.6.2/node_modules/@mikro-orm/core/utils/Configuration.d.ts:338

Inherited from
MikroOrmModuleOptions.verbose

MikroOrmOptionsFactory

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:61

Type Parameters

Type Parameter
D extends IDatabaseDriver

Methods

createMikroOrmOptions()
createMikroOrmOptions(contextName?): 
| MikroOrmModuleOptions<D>
| Promise<MikroOrmModuleOptions<D>>;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:62

Parameters
ParameterType
contextName?string
Returns

| MikroOrmModuleOptions<D> | Promise<MikroOrmModuleOptions<D>>


NestMiddlewareConsumer

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:5

Extends

  • MiddlewareConsumer

Properties

httpAdapter
httpAdapter: AbstractHttpAdapter;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:6

Methods

apply()
apply(...middleware): MiddlewareConfigProxy;

Defined in: node_modules/.pnpm/@nestjs+common@11.1.9/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.d.ts:17

Parameters
ParameterTypeDescription
...middleware(Function | Type<any>)[]middleware class/function or array of classes/functions to be attached to the passed routes.
Returns

MiddlewareConfigProxy

Inherited from
MiddlewareConsumer.apply

Type Aliases

ChunkByIdOptions

type ChunkByIdOptions<Entity, Hint, Fields, Excludes> = Omit<FindOptions<Entity, Hint, Fields, Excludes>, "offset" | "orderBy">;

Defined in: packages/mikro-orm/src/types/chunk-by-id-options.type.ts:3

Type Parameters

Type Parameter
Entity
Hint extends string
Fields extends string
Excludes extends string

EntityName

type EntityName<T> = CoreEntityName<T> | EntitySchema;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:81

Type Parameters

Type Parameter
T extends AnyEntity<T>

IdOrEntity

type IdOrEntity<Entity> = Entity["id"] | Entity;

Defined in: packages/mikro-orm/src/types/id-or-entity.type.ts:3

Type Parameters

Type Parameter
Entity extends IdEntity

MaybePromise

type MaybePromise<T> = T | Promise<T>;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:4

Type Parameters

Type Parameter
T

MikroOrmMiddlewareModuleOptions

type MikroOrmMiddlewareModuleOptions = {
forRoutesPath?: string;
};

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:26

Properties

forRoutesPath?
optional forRoutesPath: string;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/typings.d.ts:34

Routes to apply the middleware.

For Fastify, the middleware applies to all routes using (.*).

For all other frameworks including Express, the middleware applies to all routes using *.


MikroOrmModuleOptions

type MikroOrmModuleOptions = Omit<BaseMikroOrmModuleOptions, "registerRequestContext" | "context">;

Defined in: packages/mikro-orm/src/interfaces/mikro-orm-module-options.interface.ts:3

Variables

CONTEXT_NAMES

const CONTEXT_NAMES: string[];

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:4


getEntityManagerToken()

const getEntityManagerToken: (name) => string;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:30

Gets the injection token based on context name for the relevant EntityManager provider.

Parameters

ParameterTypeDescription
namestringThe context name of the database connection.

Returns

string

The EntityManager provider injection token for the supplied context name.


getMikroORMToken()

const getMikroORMToken: (name) => string;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:11

Gets the injection token based on context name for the relevant MikroORM provider.

Parameters

ParameterTypeDescription
namestringThe context name of the database connection.

Returns

string

The MikroORM provider injection token for the supplied context name.


getRepositoryToken()

const getRepositoryToken: <T>(entity, name?) => string;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:44

Gets the injection token based on class and optionally based on context name.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
entityEntityName<T>The class of the Entity to use for the injected repository provider.
name?stringAn optional context name - required for multiple database connections. See: Multiple Database Connections

Returns

string

The EntityRepository provider injection token based on the supplied entity and context name.


InjectEntityManager()

const InjectEntityManager: (name) => PropertyDecorator & ParameterDecorator;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:37

Injects an EntityManager provider based on the supplied context name.

Parameters

ParameterTypeDescription
namestringThe context name of the database connection.

Returns

PropertyDecorator & ParameterDecorator

A parameter decorator which will cause NestJS to inject the relevant EntityManager provider.


InjectMikroORM()

const InjectMikroORM: (name) => PropertyDecorator & ParameterDecorator;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:18

Injects a MikroORM provider based on the supplied context name.

Parameters

ParameterTypeDescription
namestringThe context name of the database connection.

Returns

PropertyDecorator & ParameterDecorator

A parameter decorator which will cause NestJS to inject the relevant MikroORM provider.


InjectMikroORMs()

const InjectMikroORMs: () => PropertyDecorator & ParameterDecorator;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:24

Injects the MikroORMs provider.

Returns

PropertyDecorator & ParameterDecorator

A decorator which will cause NestJS to inject the MikroORMs provider.


InjectRepository()

const InjectRepository: <T>(entity, name?) => PropertyDecorator & ParameterDecorator;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:52

Injects an EntityRepository provider.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
entityEntityName<T>The class of the Entity to use for the injected repository provider.
name?stringAn optional context name - required for multiple database connections. See: Multiple Database Connections

Returns

PropertyDecorator & ParameterDecorator

A parameter decorator which will cause NestJS to inject the relevant EntityRepository provider.


logger

const logger: Logger;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:5


MIKRO_ORM_MODULE_OPTIONS

const MIKRO_ORM_MODULE_OPTIONS: unique symbol;

Defined in: node_modules/.pnpm/@mikro-orm+nestjs@6.1.1/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts:3

Functions

loadConfigFromEnv()

function loadConfigFromEnv(): Promise<{
driver?: (config) => IDatabaseDriver;
} &
| {
clientUrl?: string;
}
| {
dbName?: string;
host?: string;
password?: string;
port?: number;
user?: string;
}>;

Defined in: packages/mikro-orm/src/utils/load-config-from-env.util.ts:40

Returns

Promise<{ driver?: (config) => IDatabaseDriver; } & | { clientUrl?: string; } | { dbName?: string; host?: string; password?: string; port?: number; user?: string; }>