huandu/go-sqlbuilder
A flexible and powerful SQL string builder library plus a zero-config ORM. observed · 2026-08-28
Health v2 · maintenance only
94/100
- Activity 98
- Release rhythm 86
- Longevity 100
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: 45.5
- age_days: 3171
- days_rel: 12
- days_push: 12
- n_releases_24m: 15
Adoption not part of the score
1726 stars · 140 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Go library for building SQL strings programmatically, compatible with the standard library database/sql interfaces, plus a lightweight zero-config ORM based on Go structs. It is driver-agnostic and supports dialects like MySQL, PostgreSQL, SQLite, and HiveQL.
Use cases
- build parameterized SQL queries in Go without string concatenation
- generate SQL for multiple database dialects from one codebase
- map Go structs to database tables with a lightweight ORM
- construct complex WHERE and JOIN clauses dynamically
- interpolate query arguments safely into SQL strings
- build nested queries and subselects in Go
When to choose
- you want fine-grained control over generated SQL without a heavy ORM
- you need to support multiple SQL dialects with the same query-building code
- you use custom or non-standard database drivers and just need SQL string construction
- you want a lightweight struct-to-table mapping with zero configuration
When to avoid
- you need a full-featured ORM with migrations, relations, and change tracking
- you prefer schema-first code generation over runtime query building
- you work with NoSQL databases or non-SQL data stores
Facets
library · maturity stable
orm database serialization databases developer-tools backend go windows cross-platform sql-builder query-builder mysql postgresql sqlite zero-config-orm parameterized-queries linux macos
3 sources
- readme: https://github.com/huandu/go-sqlbuilder · fetched 2026-08-28 · 4071ae17c958
- homepage: https://pkg.go.dev/github.com/huandu/go-sqlbuilder · fetched 2026-08-29 · 2e97416e5e18
- site_page: https://pkg.go.dev/about · fetched 2026-08-29 · 757852027879
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| huandu/go-sqlbuilder | main | 94 |
For agents
markdown · JSON · MCP: product_card(name="huandu/go-sqlbuilder")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem