1 unstable release
0.1.0 | Jan 31, 2023 |
---|
#2696 in Database interfaces
95KB
1.5K
SLoC
lunatic-diesel
A collection of Diesel Backends and Connections that enable the usage of various sql databases with the Diesel ORM.
The crate re-exports all of diesel and is therefore to be used as a replacement for diesel and should be used under
the name diesel
in the dependencies
An example of using it with SQLite is provided here: https://github.com/SquattingSocrates/sqlite-lunatic-diesel-example
Currently supported databases:
- SQLite
- PostgreSQL
- MySQL
Usage
Steps to use this library:
- install lunatic
- install diesel cli + the cli dependencies for your database of choice
- create a new rust project
- add lunatic-diesel as dependency, but use it under the name of
diesel
like this:diesel = {package = "lunatic-diesel", version = "0.1.0"}
or else some of the features of diesel will not work properly - create a migration with
diesel migration generate
- start building your app
Roadmap
- Implement a working Backend and Connection for SQLite
- Reading from db
- Inserting into db
- Update entries
- Delete entries
- Use diesel models and helper functions
- Transactions
- Joining tables
-
Returning
statement - Support for custom SQL functions
- Implement a Backend and Connection for PostgreSQL
- Implement a Backend and Connection for MySQL
Dependencies
~4–25MB
~356K SLoC