Skip to content

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 local dolt sql-server, the shared pattern from visionstudio and omniroadmap
  • CreateDatabase plus 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) launches dolt sql-server over 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) runs CREATE DATABASE IF NOT EXISTS over a server-wide connection (no database selected — see SplitDSN).
  • Client.HasUncommittedChanges reports whether the working set has staged or unstaged changes via dolt_status.
  • Client.AddAll stages all working-set changes (CALL DOLT_ADD('.')).
  • Client.Commit commits staged changes and returns the new commit hash; the message is bound as a parameter so it may contain any characters.
  • Client.CommitAll stages 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 on 127.0.0.1.
  • EnsureParseTime(dsn) appends parseTime=true to a MySQL DSN if absent — needed by ORMs such as Ent to scan DATETIME columns into time.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.