Core database abstraction for gobank — shared schema, multi-user base, built on go-postgres
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
hum3 7b31fa6084 Migrate forge references from codeberg.org to git.bytestone.uk
Module path and self-referencing URLs now point at the new Forgejo
instance following the move off Codeberg.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 16:49:30 +02:00
.gitignore Move test schema to test code, add docs page setup 2026-04-14 17:02:17 +01:00
CHANGELOG.md Update CHANGELOG for v0.1.1 2026-04-14 17:33:48 +01:00
db.go Migrate forge references from codeberg.org to git.bytestone.uk 2026-08-08 16:45:48 +02:00
db_test.go Move test schema to test code, add docs page setup 2026-04-14 17:02:17 +01:00
go.mod Migrate forge references from codeberg.org to git.bytestone.uk 2026-08-08 16:45:48 +02:00
go.sum Migrate forge references from codeberg.org to git.bytestone.uk 2026-08-08 16:49:30 +02:00
index.md Migrate forge references from codeberg.org to git.bytestone.uk 2026-08-08 16:45:48 +02:00
README.md Migrate forge references from codeberg.org to git.bytestone.uk 2026-08-08 16:45:48 +02:00
ROADMAP.md Initial scaffold for gobank-db 2026-03-25 13:46:49 +00:00
task-plus.yml Move test schema to test code, add docs page setup 2026-04-14 17:02:17 +01:00
Taskfile.yml Move test schema to test code, add docs page setup 2026-04-14 17:02:17 +01:00

gobank-db

Core database abstraction for gobank — shared schema, multi-user base, built on go-postgres.

Part of the gobank family of libraries.

Overview

gobank-db provides:

  • Shared Schema — common database schema used across gobank services
  • Multi-User Base — abstracts DB technology so multiple services/users share one database
  • Migration Support — schema versioning and migration management
  • Connection Management — pooled connections with go-postgres (pglike for dev, Postgres/CockroachDB for prod)

Testing

Tests run against pglike (in-memory SQLite with PostgreSQL syntax translation) by default — no database server needed:

task test

To run against a real PostgreSQL instance, set GOBANK_TEST_DSN:

createdb gobank_test
GOBANK_TEST_DSN="postgres:///gobank_test?host=/var/run/postgresql" task test
dropdb gobank_test

Both backends exercise the same test suite and schema.

Status

Early development. See issues for planned work.