Interface Query

A query parameter can be used in place of a query text as the first argument to the Client.query method.

interface Query {
    bigints?: boolean;
    format?: DataFormat | DataFormat[];
    name?: string;
    portal?: string;
    streams?: Record<string, Writable>;
    text: string;
    transform?: ((name) => string);
    types?: DataType[];
}

Properties

bigints?: boolean

Use bigint for the INT8 (64-bit integer) data type.

format?: DataFormat | DataFormat[]

Whether column data should be transferred using text or binary mode.

name?: string

The query name.

portal?: string

Whether to use the default portal (i.e. unnamed) or provide a name.

streams?: Record<string, Writable>

A mapping from column name to a socket, e.g. an open file.

text: string
transform?: ((name) => string)

Allows the transformation of column names as returned by the database.

Type declaration

    • (name): string
    • Parameters

      • name: string

      Returns string

types?: DataType[]

Allows making the database native type explicit for some or all columns.