Skip to main content
Version: 6.4

PostgreSqlDriver

Hierarchy

Index

Constructors

constructor

Properties

inherited[EntityManagerType]

[EntityManagerType]: SqlEntityManager<PostgreSqlDriver>

readonlyinheritedconfig

Methods

inheritedaggregate

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

    • entityName: string
    • pipeline: any[]

    Returns Promise<any[]>

inheritedclose

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

    • optionalforce: boolean

    Returns Promise<void>

inheritedconnect

inheritedconvertException

  • Converts native db errors to standardized driver exceptions


    Parameters

    • exception: Error

    Returns DriverException

inheritedcount

  • count(entityName, where, options): Promise<number>
  • Parameters

    • entityName: string
    • where: any
    • options: CountOptions<T, never> = {}

    Returns Promise<number>

inheritedcountVirtual

  • countVirtual(entityName, where, options): Promise<number>
  • Parameters

    Returns Promise<number>

inheritedcreateEntityManager

  • Parameters

    • optionaluseContext: boolean

    Returns D[typeof EntityManagerType]

inheritedexecute

  • execute(queryOrKnex, params, method, ctx, loggerContext): Promise<T>
  • Parameters

    • queryOrKnex: string | QueryBuilder<any, any> | Raw<any>
    • params: any[] = []
    • method: get | all | run = 'all'
    • optionalctx: any
    • optionalloggerContext: LoggingOptions

    Returns Promise<T>

inheritedfind

  • find(entityName, where, options): Promise<EntityData<T>[]>
  • Finds selection of entities


    Parameters

    Returns Promise<EntityData<T>[]>

inheritedfindOne

  • findOne(entityName, where, options): Promise<null | EntityData<T>>
  • Finds single entity (table row, document)


    Parameters

    Returns Promise<null | EntityData<T>>

inheritedfindVirtual

  • findVirtual(entityName, where, options): Promise<EntityData<T>[]>
  • Parameters

    Returns Promise<EntityData<T>[]>

inheritedgetConnection

inheritedgetDependencies

  • 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[]

inheritedgetMetadata

inheritedgetPlatform

inheritedloadFromPivotTable

  • loadFromPivotTable(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<Dictionary<T[]>>
  • When driver uses pivot tables for M:N, this method will load identifiers for given collections from them


    Parameters

    • prop: EntityProperty<any, any>
    • owners: (O extends { [PrimaryKeyProp]?: PK } ? PK extends keyof O<O> ? ReadonlyPrimary<UnwrapPrimary<O<O>[PK<PK>]>> : PK extends keyof O<O>[] ? ReadonlyPrimary<PrimaryPropToType<O<O>, PK<PK>>> : PK : O extends { _id?: PK } ? string | ReadonlyPrimary<PK> : O extends { uuid?: PK } ? ReadonlyPrimary<PK> : O extends { id?: PK } ? ReadonlyPrimary<PK> : O)[][]
    • where: any = ...
    • optionalorderBy: OrderDefinition<T>
    • optionalctx: any
    • optionaloptions: FindOptions<T, any, any, any>
    • optionalpivotJoin: boolean

    Returns Promise<Dictionary<T[]>>

inheritedlockPessimistic

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

    Returns Promise<void>

inheritedmapResult

  • mapResult(result, meta, populate, qb, map): null | EntityData<T>

inheritednativeDelete

  • nativeDelete(entityName, where, options): Promise<QueryResult<T>>
  • Parameters

    Returns Promise<QueryResult<T>>

inheritednativeInsert

  • nativeInsert(entityName, data, options): Promise<QueryResult<T>>

inheritednativeInsertMany

  • nativeInsertMany(entityName, data, options, transform): Promise<QueryResult<T>>

inheritednativeUpdate

  • nativeUpdate(entityName, where, data, options): Promise<QueryResult<T>>

inheritednativeUpdateMany

  • nativeUpdateMany(entityName, where, data, options): Promise<QueryResult<T>>

inheritedreconnect

inheritedsetMetadata

  • setMetadata(metadata): void
  • Parameters

    Returns void

inheritedsyncCollections

  • syncCollections(collections, options): Promise<void>
  • Parameters

    Returns Promise<void>