execdb

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT

README

ExecDB

Portable single-binary RDBMS in Go. SQLite-compatible SQL, zero setup, data snapshots as executable files.

ExecDB keeps both the database engine and the data itself inside a single executable file. There is no separate database file, no environment setup, and no container volumes to mount: just run the binary. All operations run against an in-memory SQLite-compatible engine (modernc.org/sqlite), and data is persisted by writing out a new copy of the executable with the latest in-memory state embedded in it — a "snapshot" you can run, share, or commit like any other file.

External clients (ORMs, DB tools, language drivers) can connect over a PostgreSQL-compatible wire protocol subset, so existing Postgres driver ecosystems (JDBC, psycopg, node-postgres, Npgsql, pgx, ...) work out of the box, with their own default connection settings.

Install

go install github.com/amisonnet8/execdb/cmd/execdb@latest

Requires Go 1.26+. Prebuilt binaries for Linux/macOS/Windows (amd64/arm64) are published automatically to GitHub Releases whenever a version tag is pushed — grab the one for your platform if you'd rather not build from source. No release has been tagged yet as of this writing.

Quickstart

execdb
ExecDB v...
No embedded data. Starting with an empty in-memory database.
Enter ".help" for usage hints.
execdb> CREATE TABLE t(a INTEGER);
execdb> INSERT INTO t VALUES (1);
execdb> .snapshot mydb
Wrote mydb
execdb> .exit

mydb is now a standalone executable with that table and row baked in:

chmod +x mydb   # not needed on Windows
./mydb
ExecDB v...
Loaded snapshot: mydb
Enter ".help" for usage hints.
execdb> SELECT * FROM t;
1

Add -p :5432 to also serve that data over the PostgreSQL wire protocol — any Postgres client or driver can connect to it as-is.

Learn more

日本語版は README_ja.md を参照してください。

License

MIT — see LICENSE.

Directories

Path Synopsis
cmd
execdb command
Command execdb is the reference single-binary RDBMS built on top of the engine package: a REPL plus a PostgreSQL-compatible wire protocol server, with data embedded in the executable itself.
Command execdb is the reference single-binary RDBMS built on top of the engine package: a REPL plus a PostgreSQL-compatible wire protocol server, with data embedded in the executable itself.
Package engine provides ExecDB's in-memory SQL engine as a Go library.
Package engine provides ExecDB's in-memory SQL engine as a Go library.
tests
pgclient command
Command pgclient is a small pgx-based connectivity check for ExecDB's PostgreSQL wire protocol implementation (spec §8).
Command pgclient is a small pgx-based connectivity check for ExecDB's PostgreSQL wire protocol implementation (spec §8).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL