百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rust-query

> 编程语言
开源

针对 SQLite 的 Rusty API

360 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

针对 SQLite 的 Rusty API

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

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