Interface representing a PostgreSQL connection with methods for querying and executing statements. PostgresConnection

interface PostgresConnection {
    execute: (statement: string, params: RdbmsParameterValue[]) => number;
    query: (statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet;
}

Properties

Properties

execute: (statement: string, params: RdbmsParameterValue[]) => number

Executes a statement on the database with the specified parameters.

Type declaration

    • (statement: string, params: RdbmsParameterValue[]): number
    • Parameters

      • statement: string

        The SQL statement to execute.

      • params: RdbmsParameterValue[]

        The parameters for the SQL statement.

      Returns number

      The number of rows affected by the execution.

query: (statement: string, params: RdbmsParameterValue[]) => RdbmsRowSet

Queries the database with the specified statement and parameters.

Type declaration