Skip to main content
Version: 5.2

abstractAbstractSchemaGenerator <D>

Hierarchy

Implements

  • ISchemaGenerator

Index

Constructors

constructor

Methods

clearDatabase

  • clearDatabase(options?: { schema?: string }): Promise<void>
  • Parameters

    • optionaloptions: { schema?: string }

    Returns Promise<void>

createDatabase

  • createDatabase(name: string): Promise<void>
  • creates new database and connects to it


    Parameters

    • name: string

    Returns Promise<void>

createSchema

  • createSchema(): Promise<void>
  • Returns Promise<void>

dropDatabase

  • dropDatabase(name: string): Promise<void>
  • Parameters

    • name: string

    Returns Promise<void>

dropSchema

  • dropSchema(): Promise<void>
  • Returns Promise<void>

ensureDatabase

  • ensureDatabase(): Promise<boolean>
  • Returns true if the database was created.


    Returns Promise<boolean>

ensureIndexes

  • ensureIndexes(): Promise<void>
  • Returns Promise<void>

execute

  • execute(query: string): Promise<void>
  • Parameters

    • query: string

    Returns Promise<void>

generate

  • generate(): Promise<string>
  • Returns Promise<string>

getCreateSchemaSQL

  • getCreateSchemaSQL(): Promise<string>
  • Returns Promise<string>

getDropSchemaSQL

  • getDropSchemaSQL(): Promise<string>
  • Returns Promise<string>

getUpdateSchemaMigrationSQL

  • getUpdateSchemaMigrationSQL(): Promise<{ down: string; up: string }>
  • Returns Promise<{ down: string; up: string }>

getUpdateSchemaSQL

  • getUpdateSchemaSQL(): Promise<string>
  • Returns Promise<string>

refreshDatabase

  • refreshDatabase(): Promise<void>
  • Returns Promise<void>

updateSchema

  • updateSchema(): Promise<void>
  • Returns Promise<void>