| Crates.io | nidrs-diesel |
| lib.rs | nidrs-diesel |
| version | 0.5.0 |
| created_at | 2024-05-05 10:11:32.011673+00 |
| updated_at | 2025-01-19 03:18:27.242031+00 |
| description | Nidrs & Diesel integration |
| homepage | https://github.com/nidrs/nidrs.git |
| repository | https://github.com/nidrs/nidrs.git |
| max_upload_size | |
| id | 1230127 |
| size | 85,871 |
This is a wrapper module for the Diesel ORM framework used in Nidrs to make it easier to use Diesel in Nidrs.
nidrs-diesel = { version = "*", features = ["sqlite"] }
diesel = { version = "2.1.6", default-features = false, features = ["sqlite", "chrono", "r2d2"] }
chrono = { version = "0.4.38", features = ["serde"] }
#[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;