godolt v0.3.0 Release Notes
Release Date: 2026-08-22
Overview
A feature release rounding out the local application store pattern: start or reuse a dolt sql-server, create the target database over a server-wide connection, and wrap writes in a Dolt commit — the workflow shared by visionstudio and omniroadmap. Also adds pure string helpers for building and splitting go-sql-driver DSNs pointed at a dolt sql-server. No new driver dependency is added; the caller still supplies the *sql.DB.
Highlights
- Server lifecycle helpers (
ServerReachable,StartServer,EnsureServer) — start or reuse a localdolt sql-server, the shared pattern from visionstudio and omniroadmap CreateDatabaseplus commit operations (HasUncommittedChanges,AddAll,Commit,CommitAll) for wrapping sync runs in a Dolt commit- DSN helpers (
LocalDSN,EnsureParseTime,SplitDSN) — pure string helpers for go-sql-driver DSNs pointed at a dolt sql-server, no driver dependency added
What's New
Added
ServerReachable(addr)probes a TCP address;StartServer(dataDir, port)launchesdolt sql-serverover a data directory and waits for readiness — the caller owns the returned process (Wait, kill, or detach);EnsureServer(dataDir, port)ensures one is serving, launching it detached if not. Tests run against a real dolt server, skipping when the binary is absent.CreateDatabase(ctx, db, name)runsCREATE DATABASE IF NOT EXISTSover a server-wide connection (no database selected — seeSplitDSN).Client.HasUncommittedChangesreports whether the working set has staged or unstaged changes viadolt_status.Client.AddAllstages all working-set changes (CALL DOLT_ADD('.')).Client.Commitcommits staged changes and returns the new commit hash; the message is bound as a parameter so it may contain any characters.Client.CommitAllstages and commits all changes, returning the new commit hash; a clean working set is a no-op returning("", nil)— the pattern applications use to wrap sync runs in Dolt commits.LocalDSN(port, database)returns the conventional DSN for a local dolt sql-server: root with no password on127.0.0.1.EnsureParseTime(dsn)appendsparseTime=trueto a MySQL DSN if absent — needed by ORMs such as Ent to scanDATETIMEcolumns intotime.Time.SplitDSN(dsn)splits a go-sql-driver DSN into its server-wide base (still carrying any query parameters) and the database name, for connecting before the target database exists.
Documentation
- README's Library Features table extended with the new server lifecycle, DSN, and commit helpers.
- README gains an application store pattern example: ensure a server is running, create the database, connect, and wrap writes in a Dolt commit.
Installation
go get github.com/grokify/godolt@v0.3.0
Full Changelog
See CHANGELOG.md for the complete list of changes.