IF Commons GitHub

sql/cli/connection

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0046-arcactl FR-001

The connection of arcactl (commons data 0046-arcactl FR-001): one PostgreSQL connection that the library's Driver runs on. On Bun it is Bun's own client (Bun.SQL), which needs no dependency; on Node it is pg, an optional dependency that is loaded only there. Both use one connection for the whole run, so that a transaction a statement opens is the one the next statement is in. With no URL the driver reads PGHOST, PGUSER and the rest of libpq's environment, as psql does, and a password comes from libpq's own files and not from arcactl.

Not shown here: a real server over the network. The tests of this library run the same checks on PGlite, which is in process.

Source: commons/data/sql/cli/connection.ts

1 of 1 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Connectioninterface
interface Connection

A connection: the driver the library runs on, which runtime made it, and how it is closed.

MemberTypeWhat it is
driverDriver
kind"bun" | "custom" | "pg"
close() => Promise<void>

Imported by 12 tests of the run (12 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.