Skip to main content
Extremely Popular
Latest
class Connection
import { Connection } from "https://deno.land/x/postgres@v0.19.3/connection/connection.ts";

Constructors

new
Connection(connection_params: ClientConfiguration, disconnection_callback: () => Promise<void>)

Properties

connected: boolean
readonly
pid: number | undefined
readonly
tls: boolean | undefined

Indicates if the connection is carried over TLS

readonly
transport: "tcp" | "socket" | undefined

Indicates the connection protocol used

Methods

end(): Promise<void>
query(query: Query<ResultType.ARRAY>): Promise<QueryArrayResult>
query(query: Query<ResultType.OBJECT>): Promise<QueryObjectResult>
startup(is_reconnection: boolean)

Calling startup on a connection twice will create a new session and overwrite the previous one