Interface PdoTransactionPreparedStatementI

interface PdoTransactionPreparedStatementI {
    bindValue: ((key, value) => void);
    close?: undefined;
    columnCount: (() => number);
    debug: (() => string);
    execute: ((params?) => Promise<void>);
    fecthNamed: (() => Fetched<Named>);
    fetchArray: (() => Fetched<PdoColumnValue[]>);
    fetchBoth: (() => Fetched<Both>);
    fetchClosure: (<T>(fn) => Fetched<T>);
    fetchColumn: (<T>(column) => Fetched<T>);
    fetchDictionary: (<T>() => Fetched<T>);
    fetchObject: (<T>(abstract, constructorArgs?) => Fetched<T>);
    fetchPair: (<T, U>() => Pair<T, U>);
    getAttribute: ((attribute) => string | number);
    getColumnMeta: ((column) => null | PdoColumnData);
    lastInsertId: ((name?) => Promise<null | string | number | bigint>);
    nextRowset: (() => boolean);
    resetCursor: (() => void);
    rowCount: (() => number);
    setAttribute: ((attribute, value) => boolean);
    debugSent(): string;
}

Hierarchy (view full)

Implemented by

Properties

bindValue: ((key, value) => void)

Numeric key must start from 1

Type declaration

    • (key, value): void
    • Parameters

      Returns void

close?: undefined
columnCount: (() => number)

Type declaration

    • (): number
    • Returns number

debug: (() => string)

Type declaration

    • (): string
    • Returns string

execute: ((params?) => Promise<void>)

Type declaration

    • (params?): Promise<void>
    • Parameters

      Returns Promise<void>

fecthNamed: (() => Fetched<Named>)

Specifies that the fetch method shall return each row as a key-value object keyed by column name as returned in the corresponding result set. If the result set contains multiple columns with the same name, it returns an array of values per column name.

Type declaration

fetchArray: (() => Fetched<PdoColumnValue[]>)

Specifies that the fetch method shall return each row as an array indexed by column number as returned in the corresponding result set, starting at column 0.

Type declaration

fetchBoth: (() => Fetched<Both>)

Specifies that the fetch method shall return each row as a key-value object keyed by both column name and number as returned in the corresponding result set, starting at column 0.

Type declaration

fetchClosure: (<T>(fn) => Fetched<T>)

Allows completely customize the way data is treated on the fly.

Type declaration

    • <T>(fn): Fetched<T>
    • Type Parameters

      • T

      Parameters

      • fn: ((...args) => T)
          • (...args): T
          • Parameters

            • Rest ...args: any[]

            Returns T

      Returns Fetched<T>

fetchColumn: (<T>(column) => Fetched<T>)

Specifies that the fetch method shall return only a single requested column from the next row in the result set.

Type declaration

fetchDictionary: (<T>() => Fetched<T>)

Specifies that the fetch method shall return each row as a key-value object keyed by column name as returned in the corresponding result set. If the result set contains multiple columns with the same name, it returns only a single value per column name.

Type declaration

fetchObject: (<T>(abstract, constructorArgs?) => Fetched<T>)

Specifies that the fetch method shall return a new instance of the requested class, mapping the columns to named properties in the class. Note: The setter method is called if defined in the requested class

Type declaration

    • <T>(abstract, constructorArgs?): Fetched<T>
    • Type Parameters

      • T

      Parameters

      • abstract: Newable<T>
      • Optional constructorArgs: any[]

      Returns Fetched<T>

fetchPair: (<T, U>() => Pair<T, U>)

Fetch a two-column results into a key-value object where the first column is a key and the second column is the value.

Type declaration

getAttribute: ((attribute) => string | number)

Type declaration

    • (attribute): string | number
    • Parameters

      • attribute: string

      Returns string | number

getColumnMeta: ((column) => null | PdoColumnData)

Type declaration

lastInsertId: ((name?) => Promise<null | string | number | bigint>)

Type declaration

    • (name?): Promise<null | string | number | bigint>
    • Parameters

      • Optional name: string

      Returns Promise<null | string | number | bigint>

nextRowset: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

resetCursor: (() => void)

Type declaration

    • (): void
    • Returns void

rowCount: (() => number)

Type declaration

    • (): number
    • Returns number

setAttribute: ((attribute, value) => boolean)

Type declaration

    • (attribute, value): boolean
    • Parameters

      • attribute: string
      • value: string | number

      Returns boolean

Methods