Skip to main content
Version: 5.2

abstractDatabaseDriver <C>

Hierarchy

Implements

Index

Properties

[EntityManagerType]

[EntityManagerType]: EntityManager<DatabaseDriver<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

abstractcount

  • Type parameters

    Parameters

    Returns Promise<number>

createEntityManager

ensureIndexes

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

abstractfind

  • Finds selection of entities


    Type parameters

    • T
    • P: string = never

    Parameters

    Returns Promise<EntityData<T>[]>

abstractfindOne

  • Finds single entity (table row, document)


    Type parameters

    • T
    • P: string = never

    Parameters

    Returns Promise<null | EntityData<T>>

getConnection

  • Parameters

    Returns C

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

  • Returns Platform

loadFromPivotTable

  • When driver uses pivot tables for M:N, this method will load identifiers for given collections from them


    Type parameters

    • T
    • O

    Parameters

    Returns Promise<Dictionary<T[]>>

lockPessimistic

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

    Parameters

    Returns Promise<void>

mapResult

abstractnativeDelete

  • Type parameters

    • T

    Parameters

    Returns Promise<QueryResult<T>>

abstractnativeInsert

abstractnativeInsertMany

abstractnativeUpdate

nativeUpdateMany

reconnect

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

setMetadata

  • Parameters

    Returns void

syncCollection

  • Type parameters

    • T
    • O

    Parameters

    Returns Promise<void>