Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/postgres/mod.ts>QueryResult

PostgreSQL driver for Deno
Extremely Popular
Latest
class QueryResult
import { QueryResult } from "https://deno.land/x/postgres@v0.19.3/mod.ts";

This class is used to handle the result of a query

Constructors

new
QueryResult(query: Query<ResultType>)

Create a query result instance for the query passed

Properties

command: CommandType

Type of query executed for this result

optional
rowCount: number

The amount of rows affected by the query

rowDescription: RowDescription | undefined

The row description of the result

warnings: Notice[]

The warnings of the result

Methods

handleCommandComplete(commandTag: string): void

Handles the command complete message

insertRow(_row: Uint8Array[]): void

Add a row to the result based on metadata provided by rowDescription This implementation depends on row description not being modified after initialization

This function can throw on validation, so any errors must be handled in the message loop accordingly

This function is required to parse each column of the results