NanoSQL: lightweight data mapper for SQLite


NanoSQL is a small data mapper for Rust and SQLite. It allows you to quickly and type-safely define the schema of your database, while giving you full control over the SQL of your queries.

It essentially removes the boilerplate associated with:

The library always tries to do the right thing by default. For instance:

While not a full ORM, NanoSQL does provide convenient helper types and functions for the most common tasks, such as creating tables, inserting rows, and looking up records by their primary key.

The library is highly specific to SQLite, and as such, it can readily support most of its advanced features. For example, you can declare partial indexes, set WAL mode, and the output of EXPLAIN QUERY PLAN is readily available as a pre-parsed, pretty-printed tree for you to perform debugging and performance optimization.

To get started, see the official documentation.

To contribute, star and fork the project on GitHub.