Skip to content

Commit fb7c77b

Browse files
committed
feat: create sharding structure for pool
1 parent 20d1fcc commit fb7c77b

4 files changed

Lines changed: 397 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlx-core/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ hashbrown = "0.15.0"
9494
ease-off = { workspace = true, features = ["futures"] }
9595
pin-project-lite = "0.2.14"
9696

97+
[dependencies.parking_lot]
98+
version = "0.12.4"
99+
features = ["arc_lock"]
100+
97101
[dev-dependencies]
98102
sqlx = { workspace = true, features = ["postgres", "sqlite", "mysql", "migrate", "macros", "time", "uuid"] }
99103
tokio = { version = "1", features = ["rt", "sync"] }

sqlx-core/src/pool/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ mod inner;
9090
mod idle;
9191
mod options;
9292

93+
mod shard;
94+
9395
/// An asynchronous pool of SQLx database connections.
9496
///
9597
/// Create a pool with [Pool::connect] or [Pool::connect_with] and then call [Pool::acquire]

0 commit comments

Comments
 (0)