Class PostgreSQLDataAdapter

A data adapter which is written for PostgreSQL databases.

Hierarchy

  • DataAdapterBase
    • PostgreSQLDataAdapter

Constructors

Properties

#chunkSize: number
#clientGetter: Getter<PostgreSQLClientLike>
#cursorClass: any
#debug: DebugActionWithoutSource

Accessors

  • get context(): IDataContext
  • Gets the underlying context.

    Returns IDataContext

    The context.

Methods

  • Type Parameters

    • T extends unknown = any

    Parameters

    • type: Constructor<T>
    • findOptions: undefined | null | IBuildFindQueryOptions

    Returns {
        params: any[];
        query: string;
    }

    • params: any[]
    • query: string
  • Type Parameters

    • T extends unknown = any

    Parameters

    • type: Constructor<T>
    • Optional options: null | IPostgreSQLFindOptions

    Returns Promise<number>

    Inherit Doc

  • Type Parameters

    • T extends unknown = any

    Parameters

    • type: Constructor<T>
    • Optional options: null | IPostgreSQLFindOptions

    Returns Promise<T[]>

    Inherit Doc

  • Type Parameters

    • T extends unknown = any

    Parameters

    • type: Constructor<T>
    • Optional options: null | IPostgreSQLFindOneOptions

    Returns Promise<null | T>

    Inherit Doc

  • Returns an entity by its type.

    Parameters

    • type: Constructor<any>

      The type of the entity.

    Returns null | IEntityInfo

    The object or (null), if not found.

  • Returns an entity by its type or throws an exception if not found.

    Parameters

    • type: Constructor<any>

      The type of the entity.

    Returns IEntityInfo

    The object.

  • Returns the list of entity/table fields, which represent the IDs of a row.

    Parameters

    • type: Constructor<any>

      The type.

    Returns string[]

    The list of field names.

  • Returns the list of entity fields columns, which represent the IDs of a row, or throws an exception if not defined.

    Parameters

    • type: Constructor<any>

      The type.

    Returns string[]

    The list of ID fields.

  • Returns the name of the underlying entity/table by type or throws an exception, if not configured.

    Parameters

    • type: Constructor<any>

      The type.

    Returns string

    The name of the underlying entity/table name.

  • Invokes a raw SQL query.

    Parameters

    • sql: string

      The SQL query,

    • Optional Rest ...values: any[]

      One or more values for the placeholders in the SQL query.

    Returns Promise<QueryResult<any>>

    The promise with the result.

  • Type Parameters

    • T extends unknown = any

    Parameters

    • type: Constructor<T>
    • sql: string
    • Rest ...values: any[]

    Returns AsyncGenerator<T, any, unknown>

    Inherit Doc

  • Type Parameters

    • T extends unknown = any

    Parameters

    • type: Constructor<T>
    • sql: string
    • Rest ...values: any[]

    Returns Promise<T[]>

    Inherit Doc

  • Parameters

    • context: IDataContext

    Returns this

    Inherit Doc

Generated using TypeDoc