176f4e5cf5debaa9f9e3af5eb1606a8fa1d3bfbc
PG_OPEN(cDsn) -> integer handle, -1 on failure
PG_CLOSE(nH) -> NIL
PG_QUERY(nH, cSQL [, aArgs]) -> array of { col => val } hashes
PG_EXEC (nH, cSQL [, aArgs]) -> rows affected, -1 on error
PG_LAST_ERROR(nH) -> last error string
Backed by github.com/jackc/pgx/v5/pgxpool, which is already in Five's
indirect dep tree (pgserver uses pgproto3 from the same repo). Pool
limits: MaxConns 8, MinConns 1, 5-min idle. Query timeout is capped at
30s so a runaway query can't pin a goroutine forever.
aArgs uses standard Postgres $1/$2/... placeholders — pgx parameter
binding prevents SQL injection. Never concatenate user input into cSQL.
Smoke-tested with app/pg_test.prg: bad DSN returns -1 cleanly (no
panic), the error path prints the expected fallback message, and the
real round-trip path is wired so setting LABDB_DSN to a live database
exercises SELECT + parameter binding + multi-row return without any
further code change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fivenode_go
FiveNode for Five — a Harbour-compatible web framework that compiles to a single Go binary. No Node.js, no FFI, no Apache. PRG sources go in, one executable comes out.
Successor to the koffi/N-API based fivenode framework, rebuilt on the Five Pure-Go runtime.
Status
Early bootstrap — Phase 1a in progress.
Architecture
Browser ──── HTTP/HTTPS ──── fivenode_go single binary
├─ Five hbrt VM (PRG interpreter / compiled)
├─ Five hbrtl (483 standard RTL functions)
├─ hbrtl_ext/httpserver — HTTP server RTL
├─ hbrtl_ext/capi — bridge_*.prg helpers
├─ hbrtl_ext/pgrtl — PostgreSQL client RTL
├─ app/ — bridge_*.prg + app PRG
└─ go:embed — static assets
fnode build api/*.prg --extra-rtl=hbrtl_ext/... -o myapp produces a
self-contained binary. No external dependencies beyond what the app code
itself opens (e.g. a Postgres connection).
Build
go build -o fnode ./cmd/fnode
./fnode build app/hello.prg -o hello
./hello
License
Copyright (c) 2026 Charles KWON OhJun. All rights reserved.
Description
FiveNode for Five — Harbour PRG web framework as a single Go binary (no Node.js, no FFI)
Languages
xBase
44.2%
Go
35.8%
HTML
10.2%
CSS
8.1%
JavaScript
1.7%