Skip to main content
Module

x/kysely_deno_postgres_dialect/mod.ts>kysely.PostgresDriver

Kysely dialect for PostgreSQL using the deno-postgres client.
Latest
class kysely.PostgresDriver
implements Driver
import { kysely } from "https://deno.land/x/kysely_deno_postgres_dialect@v0.27.1/mod.ts";
const { PostgresDriver } = kysely;

Constructors

new
PostgresDriver(config: PostgresDialectConfig)

Methods

Acquires a new connection from the pool.

beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise<void>

Begins a transaction.

commitTransaction(connection: DatabaseConnection): Promise<void>

Commits a transaction.

destroy(): Promise<void>

Destroys the driver and releases all resources.

init(): Promise<void>

Initializes the driver.

After calling this method the driver should be usable and acquireConnection etc. methods should be callable.

releaseConnection(connection: PostgresConnection): Promise<void>

Releases a connection back to the pool.

rollbackTransaction(connection: DatabaseConnection): Promise<void>

Rolls back a transaction.