Support the cgo-free SQLite driver (modernc.org/sqlite)

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

@peczenyj is already working on this.

Since Jun 4, 2026.

  • #37 by @peczenyj — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, sqlite
Domain
database

Research direction

Start with the README's description of supported Postgres drivers and inspect the existing database/sql driver handling. Review PR #37, then verify recording and playback with modernc.org/sqlite, including an explicit approach for preserving SQLite error messages and numeric codes.

Written by the indexing model from the issue text.

Description

The README currently states that copyist supports only the Postgres pq and pgx stdlib drivers, and invites contributions for other drivers such as SQLite.

SQLite support would be particularly attractive for the copyist workflow:

  • Recording needs no server and no Docker — just a local database file — so the record/playback cycle works anywhere, including minimal CI environments.
  • The cgo-free modernc.org/sqlite driver keeps builds simple (no C toolchain) and registers as a standard database/sql driver, which is exactly the level copyist operates at.

One design question a contribution has to answer: modernc.org/sqlite's Error type has unexported fields and no exported constructor, so it cannot be reconstructed during playback the way *pq.Error/*pgconn.PgError are — error fidelity needs an explicit approach (e.g. preserving the message and numeric code).

An implementation of this is proposed in PR #37.

Dominant language
Go
Stars
849
Forks
21
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cockroachdb/copyist

All issues in cockroachdb/copyist

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.