MongoSchemaGenerator
Hierarchy
- AbstractSchemaGenerator<MongoDriver>
- MongoSchemaGenerator
Index
Constructors
constructor
Parameters
Returns MongoSchemaGenerator
Methods
inheritedclearDatabase
Parameters
optionaloptions: ClearDatabaseOptions
Returns Promise<void>
inheritedcreateDatabase
Parameters
optionalname: string
Returns Promise<void>
createSchema
Parameters
options: MongoCreateSchemaOptions = {}
Returns Promise<void>
inheriteddropDatabase
Parameters
optionalname: string
Returns Promise<void>
dropIndexes
Parameters
optionaloptions: { collectionsWithFailedIndexes?: string[]; skipIndexes?: { collection: string; indexName: string }[] }
optionalcollectionsWithFailedIndexes: string[]
optionalskipIndexes: { collection: string; indexName: string }[]
Returns Promise<void>
dropSchema
Parameters
options: { dropMigrationsTable?: boolean } = {}
optionaldropMigrationsTable: boolean
Returns Promise<void>
ensureDatabase
Returns true if the database was created.
Returns Promise<boolean>
ensureIndexes
Parameters
options: EnsureIndexesOptions = {}
Returns Promise<void>
inheritedexecute
Parameters
query: string
Returns Promise<void>
inheritedgetCreateSchemaSQL
Parameters
optionaloptions: CreateSchemaOptions
Returns Promise<string>
inheritedgetDropSchemaSQL
Parameters
optionaloptions: Omit<DropSchemaOptions, dropDb>
Returns Promise<string>
inheritedgetUpdateSchemaMigrationSQL
Parameters
optionaloptions: UpdateSchemaOptions<unknown>
Returns Promise<{ down: string; up: string }>
inheritedgetUpdateSchemaSQL
Parameters
optionaloptions: UpdateSchemaOptions<unknown>
Returns Promise<string>
refreshDatabase
Parameters
options: MongoCreateSchemaOptions = {}
Returns Promise<void>
updateSchema
Parameters
options: MongoCreateSchemaOptions = {}
Returns Promise<void>
staticregister
Parameters
Returns void
creates new database and connects to it