These libraries are experimental. APIs may change without notice. Generated from source with koruc 0.1.7 on 8/19/2026.

pq

@korulang/pq@0.0.1

libpq (PostgreSQL) bindings for Koru, lifted behind phantom-typed connection and result obligations

pq/index.kz · 8 tors

@korulang/postgres - PostgreSQL client for Koru A semantic redesign of libpq using phantom obligations to make an entire class of database bugs impossible at compile time.

Phantom lifecycles

Derived from the phantom labels in the declarations below — state! issues an obligation the compiler will chase, !state discharges it, a bare state holds it without moving it. Nothing here is hand-drawn.

Conn 1 state connected!
Result 1 state result!

connect

<connected!> index.kz:37

disconnect

<!connected> index.kz:58

exec

<connected> index.kz:73

query

<connected><result!> index.kz:89

result.nrows

<result> index.kz:111

result.col

<result> index.kz:120

result.clear

<!result> index.kz:134

sql

comptime index.kz:153