Dolthub logo

Dolthub

Blog for DoltHub, a website hosting databases made with Dolt, an open-source version-controlled SQL database with Git-like semantics.

Try:
Dolthub logo
Dolthub

<![CDATA[ I Learned Dolt from Scratch Using Claude ]]>

A first-person account of learning Dolt (a Git-style version-controlled database) with the help of Claude. The author learns core Git concepts, how Dolt maps Git workflows to tables and rows, and follows hands‑on steps: installing Dolt, creating a camera gear table, inserting rows, using dolt add/commit/diff, branching and merging, resolving conflicts, and pushing the repository to DoltHub. The post emphasizes how the analogies and stepwise guidance from Claude made the CLI and versioned-data concepts approachable.

Dolthub logo
Dolthub

Dependency Management in Database Design

A technical case study from the Dolt codebase about managing dependencies when adding support for nonlocal tables and foreign-key validation. The author explains how package boundaries and Go’s no-cycle rule created a dependency cycle, evaluates alternatives, and resolves it by introducing a TableResolver interface and using dependency injection to keep clear module responsibilities while avoiding cycles.

Dolthub logo
Dolthub

Lovable versus Replit and Vercel

A hands-on comparison of Lovable, Replit, and Vercel v0 building an inventory-tracking web app backed by Dolt. The author finds Lovable unreliable at external DB connectivity and prone to producing broken code, praises Replit’s App Testing feature for catching/fixing issues, and demonstrates integrating Dolt’s version-control features (commit history, revert/reset, item history, diffs). The verdict: Replit first, Vercel second, Lovable third.

Dolthub logo
Dolthub

Switch Statements in Go

A technical walkthrough of Go's switch statements, explaining implicit breaking (no fall-through by default), the fallthrough keyword, expression-based case values, switches without a condition (boolean cases), and type-based switches with examples and notes on how these patterns are used in Dolt's Go codebase.

Dolthub logo
Dolthub

Migrating our Blog from Gatsby to Astro

DoltHub migrated their blog from Gatsby to Astro to reduce build times, avoid GitHub Actions resource limits, and gain better performance and framework flexibility. They used an AI agent to bulk-migrate content, then spent time fixing styling and React hydration issues with shared component libraries, updated CI tooling, and created a new Docker/NGINX deployment. Results included much faster builds, improved Lighthouse/SEO scores, and a smaller JS bundle, with further work planned around image caching and component deduplication.

Dolthub logo
Dolthub

Agentic Web Crawling

The author describes building LLM-based web crawling agents to scrape and crawl websites for data (cocktail recipes), shows code for simple and two-part crawlers, and demonstrates problems like hallucinated or missing links. Converting HTML to Markdown, chunking, and enforcing an explicit output schema reduced hallucinations and produced consistent recipe outputs, but link extraction and token/output limits remain challenging.

Dolthub logo
Dolthub

AI SQL Testing

Dolthub describes collaboration with UC Berkeley researchers who built Argus, an LLM-powered tool that generates SQL oracles and equivalent snippets to find logic bugs. Argus uncovered 19 SQL analyzer bugs in Dolt (notably incorrect conversion of LEFT/RIGHT/FULL JOIN with ON TRUE into CROSS JOIN), which were fixed; the post also summarizes Argus's cost, throughput, and provided test suites to improve Dolt's regression testing.

Dolthub logo
Dolthub

How slow is channel-based iteration?

Benchmarks comparing three Go iterator implementations for b-tree range scans (two channel-based variants and an iter.Pull-based variant). The iter.Pull approach (uses coroutine-style transfers in the Go runtime) is significantly faster and often allocates less for large scans; channel-based iteration is slower and can leak goroutines if not handled carefully. The author recommends avoiding channel-based per-item iteration when performance matters.

Dolthub logo
Dolthub

A Data Importing AI Agent

A technical walkthrough of building an LLM‑driven data import agent that ingests local files into a MySQL‑compatible Dolt database. The author explains the agent's staged architecture (prompt extraction, source schema inference, sink schema retrieval, interactive follow‑ups, proposed DB create/alter statements, and a stepwise import plan executed via local Python scripts), shows concrete CSV import examples, and discusses challenges such as LLM nondeterminism, batching/tool‑call limits, and splitting web crawling into a separate agent.

Dolthub logo
Dolthub

Run Bats with a Single Click on Windows using GoLand

A how-to showing how Windows users can run Dolt's Bats integration tests with a single click in GoLand by using WSL and the BashSupportPro plugin: configure the generated run configuration, add a Before Launch external tool to build Dolt in WSL, set IS_WINDOWS=false to bypass skip-on-Windows checks, and install required dependencies.

Dolthub logo
Dolthub

Failing 100 Real World Postgres Dumps

Doltgres engineers imported over 100 public PostgreSQL SQL dumps into an automated test scaffold to measure real-world compatibility. Only three dumps loaded with zero errors, revealing gaps like extension support, pg_dump quirks, and syntax differences (e.g., ALTER SEQUENCE owner changes and CREATE DATABASE ... WITH TEMPLATE). The team added the dumps to their test suite/CI, improved diagnostics, fixed issues, and asks users to file issues or share failing dumps.

Dolthub logo
Dolthub

Vercel v0 Works with Dolt

A hands-on walkthrough of integrating Dolt (a version-controlled relational database) with Vercel's v0.app to build an inventory-tracking web app: the author spins up a Hosted Dolt instance, configures connection and initialization scripts, deploys a v0-generated frontend, iteratively debugs issues, and adds Dolt-aware UIs for commit history, reset/revert, per-item history, and diffs. The post praises v0.app's speed and UI output but criticizes its fragile/buggy code generation.

Dolthub logo
Dolthub

Multi-stage Docker Builds for Dolt

A practical tutorial that demonstrates how to use multi-stage Dockerfiles to produce lean Dolt images that support both prebuilt-binary and source builds from a single Dockerfile. Covers Dockerfile basics, stage structuring (base, build-from-source, download-binary, runtime), build args (DOLT_VERSION), conditional COPY via glob patterns, build contexts, and how to build/run the resulting dolt-sql-server images while enabling development and test workflows.

Dolthub logo
Dolthub

Common Table Expressions in MySQL: How and Why with Examples

Technical guide to MySQL Common Table Expressions (CTEs). Covers the WITH syntax, naming CTE columns, nested and recursive CTEs (with a tree-traversal example), and using CTEs in SELECT/UPDATE/DELETE/INSERT statements, with illustrative SQL examples and notes on when CTEs improve readability and reuse.

Dolthub logo
Dolthub

We tried Go's experimental Green Tea garbage collector and it didn't help performance

The Dolt team tested Go's experimental Green Tea garbage collector by building binaries with and without it and running sysbench oltp_read_write workloads. They found essentially no change in throughput, median or tail latency; under higher concurrency Green Tea actually spent more CPU time in GC mark phases, but this did not translate into application-level improvements. As a result, they will not enable Green Tea for production builds.

Dolthub logo
Dolthub

Grafana's metrics backend for go-mysql-server

Explains how Grafana implemented a custom go-mysql-server backend that exposes Grafana Frames as SQL tables. Shows Go code for Database/Table implementations, schema mapping, row iteration with JSON conversion, and describes advanced optional interfaces (e.g., insertable tables and index-backed access).

Dolthub logo
Dolthub

When CLI Meets SQL: Building Unified Interfaces in Dolt

Describes how Dolt unifies CLI and SQL interfaces for the diff feature by extracting a shared argument parser, handling execution-context differences (CLI post-filtering vs SQL schema precomputation), implementing --skinny and --include-cols, and using helper scripts to test parity; offers patterns and guidance for contributors.

Dolthub logo
Dolthub

Developing an AI Agent

A technical walk-through of building an AI agent to import data using OpenAI's Python Agent SDK. The author covers agent frameworks, LLM statelessness and session/context management, function-tool integration for local file access (example CSV reader), and strategies to limit context growth and manage agent scope.

Dolthub logo
Dolthub

Go channels to solve interface impedance mismatch

Describes using Go channels and a background goroutine to bridge an impedance mismatch between Google's btree callback-based range scans and a RowIter Next()-based SQL iterator when implementing in-memory pg_catalog index scans for Doltgres; includes code examples and discusses trade-offs versus materializing slices, GC pressure, and possible buffering for performance.

Dolthub logo
Dolthub

Automating the Release Process for a Desktop Application

Dolthub automated the Dolt Workbench multi-platform desktop release process using GitHub Actions. The pipeline accepts a version input, bumps platform build versions, creates a release tag, runs parallel platform-specific build workflows (including code-signing for Mac/Windows), uploads artifacts to the GitHub release or workflow run, and merges the version bumps back into main. The post covers composite actions, secrets-based code signing, retryability, and next steps to automate store uploads.