@@ -26,23 +26,19 @@ use crate::catalog;
2626use crate :: primary:: { self , Mirror , Namespace } ;
2727use crate :: { Shard , PRIMARY_SHARD } ;
2828
29- mod async_txn;
3029mod coordinator;
3130mod foreign_server;
3231mod state_tracker;
3332
3433pub use diesel_async:: scoped_futures:: ScopedFutureExt ;
3534
36- pub use async_txn:: AsyncConnection ;
3735pub use coordinator:: PoolCoordinator ;
3836pub use foreign_server:: ForeignServer ;
3937use state_tracker:: { ErrorHandler , EventHandler , StateTracker } ;
4038
4139type AsyncPool = mobc:: Pool < diesel_async:: AsyncPgConnection > ;
4240/// A database connection for asynchronous diesel operations
4341pub type AsyncPgConnection = mobc:: PooledConnection < diesel_async:: AsyncPgConnection > ;
44- /// A database connection for 'classic' synchronous diesel operations
45- pub type PgConnection = AsyncConnectionWrapper < AsyncPgConnection > ;
4642
4743/// The namespace under which the `PRIMARY_TABLES` are mapped into each
4844/// shard
@@ -321,12 +317,6 @@ impl ConnectionPool {
321317 self . get_ready ( ) ?. get ( ) . await
322318 }
323319
324- /// An async version of `get`. For now, this calls `get` synchronously.
325- /// Once `get` is not used anymore, we can make it truly async.
326- pub async fn get_sync ( & self ) -> Result < PgConnection , StoreError > {
327- self . get ( ) . await . map ( AsyncConnectionWrapper :: from)
328- }
329-
330320 /// Get a connection from the pool for foreign data wrapper access;
331321 /// since that pool can be very contended, periodically log that we are
332322 /// still waiting for a connection
0 commit comments