https://github.com/rowtype-yoga/purescript-yoga-postgres
https://github.com/rowtype-yoga/purescript-yoga-postgres
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rowtype-yoga/purescript-yoga-postgres
- Owner: rowtype-yoga
- Created: 2026-02-04T22:20:06.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-05-30T10:18:24.000Z (21 days ago)
- Last Synced: 2026-05-30T12:10:10.683Z (21 days ago)
- Language: PureScript
- Size: 187 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-purescript - yoga-postgres - `node-postgres` FFI bindings, originally forked from [`purescript-node-postgres`](https://github.com/epost/purescript-node-postgres). (Databases / Deku)
README
# yoga-postgres
Type-safe PureScript FFI bindings for PostgreSQL with typed query support.
## Installation
```bash
spago install yoga-postgres yoga-sql-types
npm install pg
```
## Usage
```purescript
import Yoga.Postgres as PG
import Yoga.Postgres.TypedQuery as TQ
main = launchAff_ do
conn <- PG.connect { connectionString: "postgresql://localhost/mydb" }
-- Raw queries
rows <- PG.query conn "SELECT * FROM users" []
-- Typed queries
result <- TQ.query conn
(TQ.sql @"SELECT id, name FROM users WHERE id = $id")
{ id: 123 }
PG.disconnect conn
```
See [yoga-postgres-om](../yoga-postgres-om) for Om-wrapped operations.
## License
MIT