Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rust-query

> 编程语言
Open source

Rusty API for SQLite

360 stars0 likes0 views
WebsiteGitHub

About

Rusty API for SQLite

Example

…

When to use

Use this library if you want to fearlessly query and migrate your SQLite database with a Rusty API build on an encoding of your schema in types.

Here are some errors that rust-query can prevent at compile-time:

  • Column type errors.
  • Foreign key violations on insert/update.
  • Mismatches in number of returned rows (zero, one or multiple).
  • Use of undefined columns.
  • SQL syntax errors.

Some other errors cannot be prevented at compile-time, but they can be turned into Result types so that the user is aware of them:

  • Unique constraint errors.
  • Foreign key violations on delete.

Next to those features, rust-query also helps writing complex queries:

  • Reuse part of your query in another query by extracting it into a Rust function. Query types are kept simple so that the required function signature is easy to write.
  • Aggregates that always return a single row make it easier to reason about queries.
  • Automatic decorrelation of correlated sub-queries makes it possible to run those on SQLite.

When not to use

Do not use rust-query if you want a zero-cost abstraction. The focus of this project is on bringing errors to compile-time and generally making transactions easier to write.

Do not use rust-query migrations if you plan to keep those migrations around for a long time. Currently rust-query generates quite a bit of code for every version of your schema and migrations may need to be updated to work with a new breaking version of rust-query. Improving compatiblity with migrations managed by other tools is on the roadmap.

Note that this project is still in relatively early stages. There might be bugs to catch, so if you are worried about that, then don't use this yet.

Roadmap

The current focus is on making the library more accessible and more generally useful. Funded by NLnet!

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言