@@ -25,10 +25,10 @@ use crate::{
25
25
} ,
26
26
cmap:: {
27
27
conn:: {
28
+ pooled:: PooledConnection ,
28
29
wire:: { next_request_id, Message } ,
29
30
PinnedConnectionHandle ,
30
31
} ,
31
- Connection ,
32
32
ConnectionPool ,
33
33
RawCommandResponse ,
34
34
} ,
@@ -193,7 +193,7 @@ impl Client {
193
193
pub ( crate ) fn pin_connection_for_cursor (
194
194
& self ,
195
195
spec : & CursorSpecification ,
196
- conn : & mut Connection ,
196
+ conn : & mut PooledConnection ,
197
197
) -> Result < Option < PinnedConnectionHandle > > {
198
198
if self . is_load_balanced ( ) && spec. info . id != 0 {
199
199
Ok ( Some ( conn. pin ( ) ?) )
@@ -205,7 +205,7 @@ impl Client {
205
205
fn pin_connection_for_session (
206
206
& self ,
207
207
spec : & CursorSpecification ,
208
- conn : & mut Connection ,
208
+ conn : & mut PooledConnection ,
209
209
session : & mut ClientSession ,
210
210
) -> Result < Option < PinnedConnectionHandle > > {
211
211
if let Some ( handle) = session. transaction . pinned_connection ( ) {
@@ -489,7 +489,7 @@ impl Client {
489
489
async fn execute_operation_on_connection < T : Operation > (
490
490
& self ,
491
491
op : & mut T ,
492
- connection : & mut Connection ,
492
+ connection : & mut PooledConnection ,
493
493
session : & mut Option < & mut ClientSession > ,
494
494
txn_number : Option < i64 > ,
495
495
retryability : Retryability ,
@@ -904,7 +904,7 @@ impl Client {
904
904
/// Returns the retryability level for the execution of this operation on this connection.
905
905
fn get_retryability < T : Operation > (
906
906
& self ,
907
- conn : & Connection ,
907
+ conn : & PooledConnection ,
908
908
op : & T ,
909
909
session : & Option < & mut ClientSession > ,
910
910
) -> Result < Retryability > {
@@ -945,7 +945,7 @@ async fn get_connection<T: Operation>(
945
945
session : & Option < & mut ClientSession > ,
946
946
op : & T ,
947
947
pool : & ConnectionPool ,
948
- ) -> Result < Connection > {
948
+ ) -> Result < PooledConnection > {
949
949
let session_pinned = session
950
950
. as_ref ( )
951
951
. and_then ( |s| s. transaction . pinned_connection ( ) ) ;
@@ -995,7 +995,7 @@ impl Error {
995
995
/// ClientSession should be unpinned.
996
996
fn add_labels_and_update_pin (
997
997
& mut self ,
998
- conn : Option < & Connection > ,
998
+ conn : Option < & PooledConnection > ,
999
999
session : & mut Option < & mut ClientSession > ,
1000
1000
retryability : Option < Retryability > ,
1001
1001
) -> Result < ( ) > {
@@ -1060,7 +1060,7 @@ impl Error {
1060
1060
1061
1061
struct ExecutionDetails < T : Operation > {
1062
1062
output : T :: O ,
1063
- connection : Connection ,
1063
+ connection : PooledConnection ,
1064
1064
implicit_session : Option < ClientSession > ,
1065
1065
}
1066
1066
0 commit comments