package
A PGlite toolkit for Effect
npm install @effect/sql-pgliteGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
25.4 MB
Includes dependencies.
effect-bot
ma+effect@matechs.com
An Effect SQL client for PGlite, a WASM build of PostgreSQL that runs in the browser, Node.js, and Bun.
npm install effect @effect/sql-pgliteWhether your team is considering Effect, rolling it out, or already running it in production, we'd love to hear from you: what you're building, what works, and what you need from Effect next.
listen is a scoped subscription that returns after the listener is installed.
It exposes notifications through a queue and keeps the subscription active for
the surrounding scope:
import { PgliteClient } from "@effect/sql-pglite"
import { Effect, Queue } from "effect"
const program = Effect.gen(function*() {
const sql = yield* PgliteClient.PgliteClient
const notifications = yield* sql.listen("events")
yield* sql.notify("events", "ready")
return yield* Queue.take(notifications)
})