sqlx-dsl
sqlx-dsl: A focused SQLx query builder for Rust teams working with PostgreSQL or MySQL. Ranked #31 of 51 in Database Query Builders by our editors (5.9/10); pricing: Free plan; best for rust teams using SQLx with PostgreSQL or MySQL.
At a glance
- Editor score5.9 / 10
- PricingFree plan
- Best forRust teams using SQLx with PostgreSQL or MySQL
- Free planYes
- Paid fromNone
- Type safetyStatic
- Facts checked4 Oct 2026
Where it wins
- Fluent builders cover SELECT, INSERT, UPDATE, and DELETE
- Supports joins, grouping, subqueries, aggregates, and upserts
- Async execution and transaction helpers work with both listed backends
Where it doesn't
- Backend support is limited to PostgreSQL and MySQL
- It is a query builder, not a full ORM
- It does not provide migrations
Our verdict on sqlx-dsl
For Rust projects that already use SQLx with PostgreSQL or MySQL, sqlx-dsl offers chainable builders for composing parameterized SQL. Separate builder types cover each backend, with backend-specific placeholders and parameter binding. It targets teams that want a query-building layer without adopting a full ORM; row-to-struct mapping remains handled by SQLx's FromRow.
The library covers the common CRUD statements and adds joins, grouping, HAVING, DISTINCT, subqueries, LIMIT and OFFSET, conditional filters, and optional-value variants. Aggregate helpers include count, sum, average, minimum, and maximum. PostgreSQL and MySQL upsert operations are available, as are asynchronous execution and row-fetch methods. Transaction helpers support both backends. SQL logging is available through the optional tracing feature, which may suit teams that want query visibility within their Rust application. SQLx is the listed integration, so this is most relevant to codebases already centered on that library rather than projects seeking a database-agnostic abstraction.
sqlx-dsl is open source and has a free plan. Its scope stays deliberately focused: it builds and executes queries, but does not provide migrations or the broader modeling layer of an ORM. The listed dialects are PostgreSQL and MySQL, so teams using another database should look for a builder that supports that backend. Linux is the listed platform. Choose sqlx-dsl if a Rust team wants fluent SQL construction around SQLx and one of its supported databases; choose another tool if migrations, ORM features, or broader dialect coverage are requirements.
Your product? Our editors can test sqlx-dsl in depth and publish a review, labelled as paid · from $99/mo →
sqlx-dsl pricing
sqlx-dsl fact sheet
| Free plan | Yes |
|---|---|
| Paid from | None |
| Languages | Rust |
| SQL dialects | PostgreSQL, MySQL |
| Type safety | Static |
| Async queries | Yes |
| Raw SQL support | Yes |
| Compile without execution | Yes |
| Deployment | Desktop |
| Platforms | Linux |
| Built for | Solo, Small business (editorial estimate) |
| Integrations | 1 integrations: SQLx |
| Pricing | Free plan |
| Website | docs.rs |
| Facts checked | 4 Oct 2026 |
sqlx-dsl integrations
sqlx-dsl lists 1 integrations on its own site.
- SQLx
Alternatives to sqlx-dsl
- 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 sqlx-dsl alternatives →
Used sqlx-dsl? 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 sqlx-dsl 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
sqlx-dsl 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/sqlx-dsl/"><img src="https://www.itechguides.com/best/badge/sqlx-dsl.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
