This repository was archived by the owner on Oct 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ pub struct HranaBatchProtoBuilder {
220220 stmt_builder : SingleStatementBuilder ,
221221 current_size : u64 ,
222222 max_response_size : u64 ,
223+ step_empty : bool ,
223224}
224225
225226impl QueryResultBuilder for HranaBatchProtoBuilder {
@@ -235,6 +236,7 @@ impl QueryResultBuilder for HranaBatchProtoBuilder {
235236 }
236237
237238 fn begin_step ( & mut self ) -> Result < ( ) , QueryResultBuilderError > {
239+ self . step_empty = true ;
238240 self . stmt_builder . begin_step ( )
239241 }
240242
@@ -254,7 +256,7 @@ impl QueryResultBuilder for HranaBatchProtoBuilder {
254256 } ;
255257 match std:: mem:: replace ( & mut self . stmt_builder , new_builder) . into_ret ( ) {
256258 Ok ( res) => {
257- self . step_results . push ( Some ( res) ) ;
259+ self . step_results . push ( ( ! self . step_empty ) . then_some ( res) ) ;
258260 self . step_errors . push ( None ) ;
259261 }
260262 Err ( e) => {
@@ -276,6 +278,7 @@ impl QueryResultBuilder for HranaBatchProtoBuilder {
276278 & mut self ,
277279 cols : impl IntoIterator < Item = impl Into < Column < ' a > > > ,
278280 ) -> Result < ( ) , QueryResultBuilderError > {
281+ self . step_empty = false ;
279282 self . stmt_builder . cols_description ( cols)
280283 }
281284
You can’t perform that action at this time.
0 commit comments