5 releases

0.1.1 Nov 15, 2024
0.1.0 Oct 6, 2024
0.0.4 Sep 24, 2024
0.0.3 Jun 12, 2024
0.0.1 May 5, 2024

#368 in WebSocket

Download history 145/week @ 2024-09-20 31/week @ 2024-09-27 167/week @ 2024-10-04 19/week @ 2024-10-11 10/week @ 2024-10-18 6/week @ 2024-10-25 116/week @ 2024-11-15 5/week @ 2024-11-22 1/week @ 2024-11-29 8/week @ 2024-12-06

130 downloads per month
Used in blr

MIT license

90KB
1.5K SLoC

Nidrs & Diesel

This is a wrapper module for the Diesel ORM framework used in Nidrs to make it easier to use Diesel in Nidrs.

Install

Example

nidrs-diesel = { version = "*", features = ["sqlite"] }
diesel = { version = "2.1.6", default-features = false, features = ["sqlite", "chrono", "r2d2"] }
chrono = { version = "0.4.38", features = ["serde"] }

Use

#[default_uses(JsonInterceptor)]
#[module({
    imports: [
        DieselModule::for_root(DieselOptions{
            driver: SqlitePoolManager::new("file:db.sqlite3"),
            // driver: MysqlPoolManager::new("mysql://root:12345678@localhost/hello-diesel"),
        }),
        UserModule,
    ],
    interceptors: [JsonInterceptor],
    controllers: [AppController],
    services: [AppService],
    exports: [AppService],
})]
pub struct AppModule;

About

nidrs

Dependencies

~15–30MB
~462K SLoC