@@ -51,6 +51,7 @@ impl ToTokens for UpdateBatchImpl {
51
51
use diesel:: prelude:: * ;
52
52
use diesel_async:: RunQueryDsl ;
53
53
use futures_util:: stream:: TryStreamExt ;
54
+ use std:: ops:: DerefMut ;
54
55
let ids = ids. into_iter( ) . collect:: <Vec <_>>( ) ;
55
56
tracing:: Span :: current( ) . record( "query_ids" , tracing:: field:: debug( & ids) ) ;
56
57
Ok ( crate :: chunked_for_libpq! {
@@ -69,7 +70,7 @@ impl ToTokens for UpdateBatchImpl {
69
70
diesel:: update( dsl:: #table_name)
70
71
. filter( dsl:: #primary_key_column. eq_any( query) )
71
72
. set( & self )
72
- . load_stream:: <#row>( conn)
73
+ . load_stream:: <#row>( conn. write ( ) . await . deref_mut ( ) )
73
74
. await
74
75
. map( |s| s. map_ok( <#model as Model >:: from_row) . try_collect:: <Vec <_>>( ) ) ?
75
76
. await ?
@@ -89,6 +90,7 @@ impl ToTokens for UpdateBatchImpl {
89
90
use crate :: models:: Identifiable ;
90
91
use crate :: modelsv2:: Model ;
91
92
use #table_mod:: dsl;
93
+ use std:: ops:: DerefMut ;
92
94
use diesel:: prelude:: * ;
93
95
use diesel_async:: RunQueryDsl ;
94
96
use futures_util:: stream:: TryStreamExt ;
@@ -109,7 +111,7 @@ impl ToTokens for UpdateBatchImpl {
109
111
diesel:: update( dsl:: #table_name)
110
112
. filter( dsl:: #primary_key_column. eq_any( query) )
111
113
. set( & self )
112
- . load_stream:: <#row>( conn)
114
+ . load_stream:: <#row>( conn. write ( ) . await . deref_mut ( ) )
113
115
. await
114
116
. map( |s| {
115
117
s. map_ok( |row| {
0 commit comments