@@ -78,6 +78,7 @@ type monoValentExecution struct {
7878 isReadOnly bool //nolint:unused // TODO: build out
7979 isSkipResponse bool
8080 isMutation bool
81+ isAwait bool
8182}
8283
8384func NewMonoValentExecutorFactory (
@@ -90,6 +91,7 @@ func NewMonoValentExecutorFactory(
9091 stream streaming.MapStream ,
9192 isSkipResponse bool ,
9293 isMutation bool ,
94+ isAwait bool ,
9395) MonoValentExecutorFactory {
9496 var tcc internaldto.TxnControlCounters
9597 if insertCtx != nil {
@@ -110,6 +112,7 @@ func NewMonoValentExecutorFactory(
110112 stream : stream ,
111113 isSkipResponse : isSkipResponse ,
112114 isMutation : isMutation ,
115+ isAwait : isAwait ,
113116 }
114117}
115118
@@ -586,6 +589,7 @@ type AgnosticatePayload interface {
586589 GetInsertPreparator () InsertPreparator
587590 IsSkipResponse () bool
588591 IsMutation () bool
592+ IsAwait () bool
589593}
590594
591595type httpAgnosticatePayload struct {
@@ -604,6 +608,7 @@ type httpAgnosticatePayload struct {
604608 insertPreparator InsertPreparator
605609 isSkipResponse bool
606610 isMutation bool
611+ isAwait bool
607612}
608613
609614func newHTTPAgnosticatePayload (
@@ -622,6 +627,7 @@ func newHTTPAgnosticatePayload(
622627 insertPreparator InsertPreparator ,
623628 isSkipResponse bool ,
624629 isMutation bool ,
630+ isAwait bool ,
625631) AgnosticatePayload {
626632 return & httpAgnosticatePayload {
627633 tableMeta : tableMeta ,
@@ -639,13 +645,18 @@ func newHTTPAgnosticatePayload(
639645 insertPreparator : insertPreparator ,
640646 isSkipResponse : isSkipResponse ,
641647 isMutation : isMutation ,
648+ isAwait : isAwait ,
642649 }
643650}
644651
645652func (ap * httpAgnosticatePayload ) GetPolyHandler () PolyHandler {
646653 return ap .polyHandler
647654}
648655
656+ func (ap * httpAgnosticatePayload ) IsAwait () bool {
657+ return ap .isAwait
658+ }
659+
649660func (ap * httpAgnosticatePayload ) GetInsertPreparator () InsertPreparator {
650661 return ap .insertPreparator
651662}
@@ -748,6 +759,7 @@ func agnosticate(
748759 insertPreparator := agPayload .GetInsertPreparator ()
749760 isSkipResponse := agPayload .IsNilResponseAcceptable ()
750761 isMutation := agPayload .IsMutation ()
762+ isAwait := agPayload .IsAwait ()
751763 // TODO: TCC setup
752764 armoury , armouryErr := agPayload .GetArmoury ()
753765 if armouryErr != nil {
@@ -797,7 +809,7 @@ func agnosticate(
797809 insertPreparator ,
798810 isSkipResponse ,
799811 false ,
800- false ,
812+ isAwait ,
801813 false ,
802814 isMutation ,
803815 "" ,
@@ -1193,7 +1205,7 @@ func (sp *standardProcessor) Process() ProcessorResponse {
11931205 )
11941206 housekeepingDone = insertPrepResult .IsHousekeepingDone ()
11951207 insertPrepErr , hasInsertPrepErr := insertPrepResult .GetError ()
1196- if isSkipResponse && isMutation && httpResponse .StatusCode < 300 {
1208+ if ! isAwait && isSkipResponse && isMutation && httpResponse .StatusCode < 300 {
11971209 return newHTTPProcessorResponse (
11981210 nil , reversalStream , false , nil ,
11991211 ).WithSuccessMessages ([]string {"The operation was despatched successfully" })
@@ -1388,6 +1400,7 @@ func (mv *monoValentExecution) GetExecutor() (func(pc primitive.IPrimitiveCtx) i
13881400 mv ,
13891401 mv .isSkipResponse ,
13901402 mv .isMutation ,
1403+ mv .isAwait ,
13911404 )
13921405 processorResponse , agnosticErr := agnosticate (agnosticatePayload )
13931406 if agnosticErr != nil {
0 commit comments