nidrs-diesel

Crates.ionidrs-diesel
lib.rsnidrs-diesel
version
sourcesrc
created_at2024-05-05 10:11:32.011673+00
updated_at2025-01-19 03:18:27.242031+00
descriptionNidrs & Diesel integration
homepagehttps://github.com/nidrs/nidrs.git
repositoryhttps://github.com/nidrs/nidrs.git
max_upload_size
id1230127
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Lyda (Lydanne)

documentation

README

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

Commit count: 606

cargo fmt