gsql
gsql: Typed CRUD and upsert builders for Go, with SQL generation and database/sql execution. Ranked #6 of 51 in Database Query Builders by our editors (7.9/10); pricing: Free plan; best for go teams seeking typed builders for CRUD queries.
At a glance
- Editor score7.9 / 10
- PricingFree plan
- Best forGo teams seeking typed builders for CRUD queries
- Free planYes
- Paid fromNone
- Type safetyStatic
- Facts checked4 Oct 2026
Where it wins
- Uses Go generics for compile-time checks of column and value types
- Build() exposes SQL text and parameter arguments before execution
- Supports CRUD and upsert builders with database/sql execution
Where it doesn't
- Dialect coverage is limited to PostgreSQL, MySQL, and SQLite
- No raw SQL escape hatch is listed
- Support is through documentation
Our verdict on gsql
For Go developers who want typed SQL construction inside their applications, gsql is an open-source library built on Go’s database/sql package. It defines tables and columns with generics, then offers fluent builders for common query work. This makes it relevant to teams that want compile-time checking without code generation, whether working solo or in a larger organization. It is a library to incorporate into a Go application, not a hosted database tool.
The builder surface covers SELECT, WHERE, JOIN, ORDER BY, LIMIT and OFFSET, along with INSERT, bulk INSERT, UPSERT, UPDATE and DELETE. Build() returns SQL text and parameter arguments without executing a query, so developers can inspect generated statements separately from running them. Values are parameterized and identifiers are validated. Execution is available through Go database/sql interfaces, including *sql.DB and *sql.Tx. The listed dialects are PostgreSQL, MySQL and SQLite, so projects using other SQL dialects may need another approach.
The project is open source, with a free plan and MIT licensing identified on its package page; the published information describes no commercial pricing. Deployment is self-hosted, which fits developers who prefer a library integrated into their own Go code rather than a managed service. Support is through documentation. gsql is a focused choice for teams prioritizing typed CRUD query construction and explicit SQL generation; it is less suited to projects needing broad dialect coverage, a raw SQL escape hatch, or support beyond documentation.
Your product? Our editors can test gsql in depth and publish a review, labelled as paid · from $99/mo →
gsql pricing
gsql fact sheet
| Free plan | Yes |
|---|---|
| Paid from | None |
| Languages | Go |
| SQL dialects | PostgreSQL, MySQL, SQLite |
| Type safety | Static |
| Async queries | Yes |
| Raw SQL support | No |
| Compile without execution | Yes |
| Deployment | Self-hosted |
| Platforms | Linux, macOS, Windows |
| Support | Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Pricing | Free plan |
| Website | pkg.go.dev |
| Facts checked | 4 Oct 2026 |
Alternatives to gsql
- jOOQA fluent SQL framework for JVM teams that want generated, type-safe database access.9.3
- SQLAlchemySQL construction, ORM, and database services for Python applications.9.1
- JetBrains ExposedA free, open-source Kotlin library with a type-safe SQL DSL and JDBC and R2DBC access.9.0
gsql vs the competition
- gsql vs jOOQ
- gsql vs SQLAlchemy
- gsql vs JetBrains Exposed
- gsql vs Laravel Query Builder
- gsql vs Doctrine DBAL QueryBuilder
- gsql vs Doma
Compare gsql with any tool side by side →
Used gsql? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used gsql for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
gsql is listed in our Database Query Builders directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/gsql/"><img src="https://www.itechguides.com/best/badge/gsql.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. How we rank.
Last updated · How we research and update
