DATA-DOG/go-sqlmock
Sql mock driver for golang to test database interactions observed · 2026-08-28
Health v2 · maintenance only
64/100
- Activity 91
- Release rhythm 8
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4590
- days_rel: n/a
- days_push: 54
- n_releases_24m: 0
Adoption not part of the score
6567 stars · 414 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
go-sqlmock is a mock library implementing Go's sql/driver interface to simulate SQL driver behavior in tests without a real database connection. It supports expectation-based matching, concurrency, context features, and named parameters, enabling TDD workflows for database interactions.
Use cases
- unit test database interactions in Go without a real database
- mock SQL driver behavior in tests
- test database transactions and rollbacks
- verify SQL query expectations in TDD workflow
- test code that uses database/sql with any driver
When to choose
- you want fast, dependency-free unit tests for Go database code
- you follow TDD and need strict expectation ordering for SQL calls
- you need to mock context or named parameter features of database/sql
When to avoid
- you need functional/integration testing against a real database
- you want a library that is actively developed with new features
- you prefer higher-level mocking like sqlmock alternatives with query builders
Facets
library · maturity maintenance
mocking testing database-driver testing databases developer-tools go cli sql tdd unit-testing database-mocking sql-driver
1 source
- readme: https://github.com/DATA-DOG/go-sqlmock · fetched 2026-08-28 · 74382e860f42
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| DATA-DOG/go-sqlmock | main | 64 |
For agents
markdown · JSON · MCP: product_card(name="DATA-DOG/go-sqlmock")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem