Without direct rocket dependency
This commit is contained in:
parent
3b21b999a7
commit
dfe26f9b7c
10
Cargo.toml
10
Cargo.toml
@ -36,12 +36,8 @@ sqlx-core = { version = "^0.5", optional = true }
|
||||
sqlx-macros = { version = "^0.5", optional = true }
|
||||
serde_json = { version = "^1", optional = true }
|
||||
uuid = { version = "0.8", features = ["serde", "v4"], optional = true }
|
||||
rocket = { git = "https://github.com/SergioBenitez/Rocket.git", features = [
|
||||
"json",
|
||||
], optional = true }
|
||||
rocket_db_pools = { git = "https://github.com/SergioBenitez/Rocket.git", features = [
|
||||
"sqlx_mysql",
|
||||
], optional = true }
|
||||
rocket_db_pools = { git = "https://github.com/SergioBenitez/Rocket.git", features = ["sqlx_mysql"], optional = true }
|
||||
async-trait = { version = "0.1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
smol = { version = "^1.2" }
|
||||
@ -93,4 +89,4 @@ runtime-actix-rustls = ["sqlx/runtime-actix-rustls", "runtime-actix"]
|
||||
runtime-tokio = []
|
||||
runtime-tokio-native-tls = ["sqlx/runtime-tokio-native-tls", "runtime-tokio"]
|
||||
runtime-tokio-rustls = ["sqlx/runtime-tokio-rustls", "runtime-tokio"]
|
||||
rocket-db = ["rocket", "rocket_db_pools"]
|
||||
web-api-rocket = ["rocket_db_pools", "async-trait"]
|
||||
|
@ -5,11 +5,9 @@ edition = "2018"
|
||||
publish = false
|
||||
[workspace]
|
||||
[dependencies]
|
||||
rocket = { git = "https://github.com/SergioBenitez/Rocket.git", features = [
|
||||
"json",
|
||||
] }
|
||||
rocket = { git = "https://github.com/SergioBenitez/Rocket.git", features = ["json"] }
|
||||
rocket_db_pools = { git = "https://github.com/SergioBenitez/Rocket.git", features = [] }
|
||||
sea-orm = { path = "../../", features = ["rocket-db"] }
|
||||
sea-orm = { path = "../../", features = ["web-api-rocket"] }
|
||||
sea-query = { version = "^0.12.8" }
|
||||
|
||||
serde_json = { version = "^1" }
|
||||
|
@ -20,7 +20,7 @@ pub use sqlx_postgres::*;
|
||||
#[cfg(feature = "sqlx-sqlite")]
|
||||
pub use sqlx_sqlite::*;
|
||||
|
||||
#[cfg(feature = "rocket-db")]
|
||||
#[cfg(feature = "web-api-rocket")]
|
||||
mod rocket_db;
|
||||
#[cfg(feature = "rocket-db")]
|
||||
#[cfg(feature = "web-api-rocket")]
|
||||
pub use rocket_db::*;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use rocket::figment::Figment;
|
||||
use rocket_db_pools::{Config, Error};
|
||||
use async_trait::async_trait;
|
||||
use rocket_db_pools::{rocket::figment::Figment, Config, Error};
|
||||
|
||||
#[rocket::async_trait]
|
||||
#[async_trait]
|
||||
impl rocket_db_pools::Pool for crate::Database {
|
||||
type Error = crate::DbErr;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user