lunatic-diesel

Crates.iolunatic-diesel
lib.rslunatic-diesel
version0.1.0
sourcesrc
created_at2023-01-31 15:03:19.292724
updated_at2023-01-31 15:03:19.292724
descriptionDiesel ORM bindings for lunatic
homepage
repositoryhttps://github.com/SquattingSocrates/lunatic-diesel
max_upload_size
id772755
size95,825
Yuriy Voshchepynets (SquattingSocrates)

documentation

README

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
Commit count: 15

cargo fmt