MikroORM <EM, Entities>
Hierarchy
- MikroORM<LibSqlDriver, EM, Entities>
- MikroORM
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
options: Options<LibSqlDriver, EM, Entities>
Returns LibSqlMikroORM<EM, Entities>
Properties
readonlyinheritedconfig
readonlyinheriteddriver
inheritedem
The global EntityManager instance. If you are using RequestContext helper, it will automatically pick the request specific context under the hood
Accessors
inheritedentityGenerator
Gets the EntityGenerator.
Returns IEntityGenerator
inheritedmigrator
Gets the Migrator.
Returns IMigrator
inheritedschema
Gets the SchemaGenerator.
Returns ReturnType<ReturnType<Driver[getPlatform]>[getSchemaGenerator]>
inheritedseeder
Gets the SeedManager
Returns ISeedManager
Methods
inheritedcheckConnection
Checks whether the database connection is active, returns the reason if not.
Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }>
inheritedclose
Closes the database connection.
Parameters
force: boolean = false
Returns Promise<void>
inheritedconnect
Connects to the database.
Returns Promise<LibSqlDriver>
inheriteddiscoverEntity
Allows dynamically discovering new entity by reference, handy for testing schema diffing.
Parameters
entities: T | T[]
optionalreset: EntityName | EntityName[]
Returns void
inheritedgetMetadata
Gets the
MetadataStorage.Returns MetadataStorage
inheritedisConnected
Checks whether the database connection is active.
Returns Promise<boolean>
inheritedreconnect
Reconnects, possibly to a different database.
Parameters
options: Partial<Options<LibSqlDriver, EM, Entities>> = {}
Returns Promise<void>
The main class used to configure and bootstrap the ORM.