sq (Structured Query)
sq (Structured Query): A focused Go library for typed SQL building, data mapping, and migrations. Ranked #22 of 51 in Database Query Builders by our editors (6.8/10); pricing: Free plan; best for go teams wanting typed queries and migrations.
At a glance
- Editor score6.8 / 10
- PricingFree plan
- Best forGo teams wanting typed queries and migrations
- Free planYes
- Paid fromNone
- Type safetyStatic
- Facts checked4 Oct 2026
Where it wins
- Build typed SELECT, INSERT, UPDATE, and DELETE queries in Go
- Compile queries to SQL and arguments across four listed dialects
- Add declarative schema migrations and query logging
Where it doesn't
- Focused on Go rather than supporting multiple programming languages
- Not a full ORM for teams seeking broader data-access abstractions
- Raw SQL templates still require developers to write SQL
Our verdict on sq (Structured Query)
sq is an open-source Go library for building SQL queries and mapping result rows to Go structs. It suits developers who want type-safe query construction and data mapping without adopting a full ORM. Its query-builder API covers SELECT, INSERT, UPDATE, and DELETE, while raw SQL templates with placeholders offer another way to express queries. The published platform details include Linux, Windows, macOS, and self-hosted use, so it can fit Go projects across those environments.
The main draw is its balance of typed construction and explicit SQL access. Queries can be compiled to SQL plus arguments, and the listed dialects are SQLite, PostgreSQL, MySQL, and SQL Server. That gives teams working with those databases a common library for query building while preserving visibility into the SQL being generated. Raw SQL templates provide an escape hatch for queries that do not fit the builder; developers still need to be comfortable authoring SQL where they choose that route. Query logging is also included, alongside fetch and execution functions.
Declarative schema migrations extend sq beyond query construction, making it relevant to teams that want migration support in the same Go library. Its scope remains deliberately narrower than a full ORM: it focuses on query building and mapping rather than a broader set of ORM abstractions. Choose sq if a Go codebase needs typed queries, mapping, and migrations across its listed SQL dialects. Teams seeking a language-neutral tool or a full ORM should consider a broader alternative. The README says Go 1.19+ while the linked documentation says Go 1.18+, so check the relevant compatibility guidance for a project.
Your product? Our editors can test sq (Structured Query) in depth and publish a review, labelled as paid · from $99/mo →
sq (Structured Query) pricing
sq (Structured Query) fact sheet
| Free plan | Yes |
|---|---|
| Paid from | None |
| Languages | Go |
| SQL dialects | SQLite, PostgreSQL, MySQL, SQL Server |
| Type safety | Static |
| Async queries | Not verified |
| Raw SQL support | Yes |
| Compile without execution | Yes |
| Deployment | Self-hosted |
| Platforms | Linux, Windows, macOS |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Pricing | Free plan |
| Website | github.com |
| Facts checked | 4 Oct 2026 |
Alternatives to sq (Structured Query)
- 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
See all sq (Structured Query) alternatives →
Used sq (Structured Query)? 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 sq (Structured Query) 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
sq (Structured Query) 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/sq-structured-query/"><img src="https://www.itechguides.com/best/badge/sq-structured-query.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
