Skip to main content
Version: 5.3

IDatabaseDriver <C>

Implemented by

Index

Properties

[EntityManagerType]

[EntityManagerType]: EntityManager<IDatabaseDriver<C>>

readonlyconfig

Methods

aggregate

  • aggregate(entityName: string, pipeline: any[]): Promise<any[]>
  • Parameters

    • entityName: string
    • pipeline: any[]

    Returns Promise<any[]>

close

  • close(force?: boolean): Promise<void>
  • Parameters

    • optionalforce: boolean

    Returns Promise<void>

connect

  • connect(): Promise<C>
  • Returns Promise<C>

convertException

  • Converts native db errors to standardized driver exceptions


    Parameters

    • exception: Error

    Returns DriverException

count

createEntityManager

ensureIndexes

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

find

findOne

findVirtual

getConnection

getDependencies

  • getDependencies(): string[]
  • Returns name of the underlying database dependencies (e.g. mongodb or mysql2) for SQL drivers it also returns knex in the array as connectors are not used directly there


    Returns string[]

getMetadata

getPlatform

loadFromPivotTable

lockPessimistic

  • lockPessimistic<T>(entity: T, options: LockOptions): Promise<void>

mapResult

nativeDelete

nativeInsert

nativeInsertMany

nativeUpdate

nativeUpdateMany

reconnect

  • reconnect(): Promise<C>
  • Returns Promise<C>

setMetadata

syncCollection