abstractAbstractSchemaGenerator <D>
Hierarchy
- AbstractSchemaGenerator
Implements
Index
Constructors
constructor
Parameters
em: D | ReturnType<D[createEntityManager]>
Returns AbstractSchemaGenerator<D>
Methods
clearDatabase
Parameters
optionaloptions: ClearDatabaseOptions
Returns Promise<void>
createDatabase
Parameters
optionalname: string
Returns Promise<void>
createSchema
Parameters
optionaloptions: CreateSchemaOptions
Returns Promise<void>
dropDatabase
Parameters
optionalname: string
Returns Promise<void>
dropSchema
Parameters
optionaloptions: DropSchemaOptions
Returns Promise<void>
ensureDatabase
Returns true if the database was created.
Parameters
optionaloptions: EnsureDatabaseOptions
Returns Promise<boolean>
ensureIndexes
Returns Promise<void>
execute
Parameters
query: string
Returns Promise<void>
getCreateSchemaSQL
Parameters
optionaloptions: CreateSchemaOptions
Returns Promise<string>
getDropSchemaSQL
Parameters
optionaloptions: Omit<DropSchemaOptions, dropDb>
Returns Promise<string>
getUpdateSchemaMigrationSQL
Parameters
optionaloptions: UpdateSchemaOptions<unknown>
Returns Promise<{ down: string; up: string }>
getUpdateSchemaSQL
Parameters
optionaloptions: UpdateSchemaOptions<unknown>
Returns Promise<string>
refreshDatabase
Parameters
optionaloptions: RefreshDatabaseOptions
Returns Promise<void>
updateSchema
Parameters
optionaloptions: UpdateSchemaOptions<unknown>
Returns Promise<void>
creates new database and connects to it