Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

broadcaster

broadcaster: Broadcaster

Broadcaster used on this query runner to broadcast entity events.

connection

connection: Connection

Connection used by this query runner.

data

data: object

Stores temporarily user data. Useful for sharing data with subscribers.

Type declaration

Protected databaseConnection

databaseConnection: any

Real database connection from a connection pool used to perform queries.

isReleased

isReleased: boolean = false

Indicates if connection for this query runner is released. Once its released, query runner cannot run queries anymore.

isTransactionActive

isTransactionActive: boolean = false

Indicates if transaction is in progress.

loadedTables

loadedTables: Table[] = []

All synchronized tables in the database.

manager

manager: EntityManager

Entity manager working only with current query runner.

Protected mode

mode: "master" | "slave"

Mode in which query runner executes. Used for replication. If replication is not setup its value is ignored.

Protected sqlInMemory

sqlInMemory: SqlInMemory = new SqlInMemory()

Sql-s stored if "sql in memory" mode is enabled.

Protected sqlMemoryMode

sqlMemoryMode: boolean = false

Indicates if special query runner mode in which sql queries won't be executed is enabled.

Methods

clearSqlMemory

  • clearSqlMemory(): void

disableSqlMemory

  • disableSqlMemory(): void
  • Disables special query runner mode in which sql queries won't be executed started by calling enableSqlMemory() method.

    Previously memorized sql will be flushed.

    Returns void

enableSqlMemory

  • enableSqlMemory(): void
  • Enables special query runner mode in which sql queries won't be executed, instead they will be memorized into a special variable inside query runner. You can get memorized sql using getMemorySql() method.

    Returns void

executeMemoryDownSql

  • executeMemoryDownSql(): Promise<void>

executeMemoryUpSql

  • executeMemoryUpSql(): Promise<void>

Protected executeQueries

  • executeQueries(upQueries: string | string[], downQueries: string | string[]): Promise<void>
  • Executes sql used special for schema build.

    Parameters

    • upQueries: string | string[]
    • downQueries: string | string[]

    Returns Promise<void>

Protected getCachedTable

  • getCachedTable(tableName: string): Promise<Table>

getMemorySql

getTable

  • getTable(tablePath: string): Promise<Table | undefined>

getTables

  • getTables(tableNames: string[]): Promise<Table[]>

Protected isColumnChanged

  • isColumnChanged(oldColumn: TableColumn, newColumn: TableColumn, checkDefault?: undefined | true | false, checkComment?: undefined | true | false): boolean
  • Checks if at least one of column properties was changed. Does not checks column type, length and autoincrement, because these properties changes separately.

    Parameters

    • oldColumn: TableColumn
    • newColumn: TableColumn
    • Optional checkDefault: undefined | true | false
    • Optional checkComment: undefined | true | false

    Returns boolean

Protected isDefaultColumnLength

  • isDefaultColumnLength(table: Table, column: TableColumn, length: string): boolean

Protected isDefaultColumnPrecision

  • isDefaultColumnPrecision(table: Table, column: TableColumn, precision: number): boolean

Protected isDefaultColumnScale

  • isDefaultColumnScale(table: Table, column: TableColumn, scale: number): boolean

Protected isDefaultColumnWidth

  • isDefaultColumnWidth(table: Table, column: TableColumn, width: number): boolean

Protected Abstract loadTables

  • loadTables(tablePaths: string[]): Promise<Table[]>

Abstract query

  • query(query: string, parameters?: any[]): Promise<any>

Protected replaceCachedTable

  • replaceCachedTable(table: Table, changedTable: Table): void

Generated using TypeDoc