Edit
This commit is contained in:
parent
e57975930e
commit
f9dd9d242a
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
@ -148,7 +148,7 @@ jobs:
|
||||
with:
|
||||
command: test
|
||||
args: >
|
||||
--path sea-orm-rocket
|
||||
--manifest-path sea-orm-rocket/Cargo.toml
|
||||
|
||||
cli:
|
||||
name: CLI
|
||||
|
@ -27,8 +27,8 @@ features = ["macros", "runtime-tokio-native-tls"]
|
||||
default-features = false
|
||||
|
||||
[dependencies.sea-orm-rocket]
|
||||
path = "../../sea-orm-rocket/lib" # remove this line in your own project
|
||||
git = "https://github.com/SeaQL/sea-orm"
|
||||
path = "../../sea-orm-rocket/lib" # remove this line in your own project and use the git line
|
||||
# git = "https://github.com/SeaQL/sea-orm"
|
||||
|
||||
[features]
|
||||
default = ["sqlx-postgres"]
|
||||
|
@ -3,8 +3,7 @@ use rocket::figment::Figment;
|
||||
/// Generic [`Database`](crate::Database) driver connection pool trait.
|
||||
///
|
||||
/// This trait provides a generic interface to various database pooling
|
||||
/// implementations in the Rust ecosystem. It can be implemented by anyone, but
|
||||
/// this crate provides implementations for common drivers.
|
||||
/// implementations in the Rust ecosystem. It can be implemented by anyone.
|
||||
///
|
||||
/// This is adapted from the original `rocket_db_pools`. But on top we require
|
||||
/// `Connection` itself to be `Sync`. Hence, instead of cloning or allocating
|
||||
@ -36,7 +35,7 @@ pub trait Pool: Sized + Send + Sync + 'static {
|
||||
/// insufficient resources, or another database-specific error.
|
||||
async fn init(figment: &Figment) -> Result<Self, Self::Error>;
|
||||
|
||||
/// Borrow a database connection
|
||||
/// Borrows a reference to the pool
|
||||
fn borrow(&self) -> &Self::Connection;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user