@@ -117,7 +117,7 @@ type wrappedService struct {
117117}
118118
119119func (ws * wrappedService ) Begin (ctx context.Context , target * querypb.Target , options * querypb.ExecuteOptions ) (state TransactionState , err error ) {
120- opts := WrapOpts {InTransaction : false }
120+ opts := WrapOpts {InTransaction : false , Options : options }
121121 err = ws .wrapper (ctx , target , ws .impl , "Begin" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
122122 var innerErr error
123123 state , innerErr = conn .Begin (ctx , target , options )
@@ -240,7 +240,7 @@ func (ws *wrappedService) UnresolvedTransactions(ctx context.Context, target *qu
240240
241241func (ws * wrappedService ) Execute (ctx context.Context , target * querypb.Target , query string , bindVars map [string ]* querypb.BindVariable , transactionID , reservedID int64 , options * querypb.ExecuteOptions ) (qr * sqltypes.Result , err error ) {
242242 inDedicatedConn := transactionID != 0 || reservedID != 0
243- opts := WrapOpts {InTransaction : inDedicatedConn }
243+ opts := WrapOpts {InTransaction : inDedicatedConn , Options : options }
244244 err = ws .wrapper (ctx , target , ws .impl , "Execute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
245245 var innerErr error
246246 qr , innerErr = conn .Execute (ctx , target , query , bindVars , transactionID , reservedID , options )
@@ -254,7 +254,7 @@ func (ws *wrappedService) Execute(ctx context.Context, target *querypb.Target, q
254254// StreamExecute implements the QueryService interface
255255func (ws * wrappedService ) StreamExecute (ctx context.Context , target * querypb.Target , query string , bindVars map [string ]* querypb.BindVariable , transactionID int64 , reservedID int64 , options * querypb.ExecuteOptions , callback func (* sqltypes.Result ) error ) error {
256256 inDedicatedConn := transactionID != 0 || reservedID != 0
257- opts := WrapOpts {InTransaction : inDedicatedConn }
257+ opts := WrapOpts {InTransaction : inDedicatedConn , Options : options }
258258 err := ws .wrapper (ctx , target , ws .impl , "StreamExecute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
259259 streamingStarted := false
260260 innerErr := conn .StreamExecute (ctx , target , query , bindVars , transactionID , reservedID , options , func (qr * sqltypes.Result ) error {
@@ -270,7 +270,7 @@ func (ws *wrappedService) StreamExecute(ctx context.Context, target *querypb.Tar
270270
271271func (ws * wrappedService ) BeginExecute (ctx context.Context , target * querypb.Target , preQueries []string , query string , bindVars map [string ]* querypb.BindVariable , reservedID int64 , options * querypb.ExecuteOptions ) (state TransactionState , qr * sqltypes.Result , err error ) {
272272 inDedicatedConn := reservedID != 0
273- opts := WrapOpts {InTransaction : inDedicatedConn }
273+ opts := WrapOpts {InTransaction : inDedicatedConn , Options : options }
274274 err = ws .wrapper (ctx , target , ws .impl , "BeginExecute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
275275 var innerErr error
276276 state , qr , innerErr = conn .BeginExecute (ctx , target , preQueries , query , bindVars , reservedID , options )
@@ -282,7 +282,7 @@ func (ws *wrappedService) BeginExecute(ctx context.Context, target *querypb.Targ
282282// BeginStreamExecute implements the QueryService interface
283283func (ws * wrappedService ) BeginStreamExecute (ctx context.Context , target * querypb.Target , preQueries []string , query string , bindVars map [string ]* querypb.BindVariable , reservedID int64 , options * querypb.ExecuteOptions , callback func (* sqltypes.Result ) error ) (state TransactionState , err error ) {
284284 inDedicatedConn := reservedID != 0
285- opts := WrapOpts {InTransaction : inDedicatedConn }
285+ opts := WrapOpts {InTransaction : inDedicatedConn , Options : options }
286286 err = ws .wrapper (ctx , target , ws .impl , "BeginStreamExecute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
287287 var innerErr error
288288 state , innerErr = conn .BeginStreamExecute (ctx , target , preQueries , query , bindVars , reservedID , options , callback )
@@ -355,7 +355,7 @@ func (ws *wrappedService) HandlePanic(err *error) {
355355
356356// ReserveBeginExecute implements the QueryService interface
357357func (ws * wrappedService ) ReserveBeginExecute (ctx context.Context , target * querypb.Target , preQueries []string , postBeginQueries []string , sql string , bindVariables map [string ]* querypb.BindVariable , options * querypb.ExecuteOptions ) (state ReservedTransactionState , res * sqltypes.Result , err error ) {
358- opts := WrapOpts {InTransaction : false }
358+ opts := WrapOpts {InTransaction : false , Options : options }
359359 err = ws .wrapper (ctx , target , ws .impl , "ReserveBeginExecute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
360360 var err error
361361 state , res , err = conn .ReserveBeginExecute (ctx , target , preQueries , postBeginQueries , sql , bindVariables , options )
@@ -367,7 +367,7 @@ func (ws *wrappedService) ReserveBeginExecute(ctx context.Context, target *query
367367
368368// ReserveBeginStreamExecute implements the QueryService interface
369369func (ws * wrappedService ) ReserveBeginStreamExecute (ctx context.Context , target * querypb.Target , preQueries []string , postBeginQueries []string , sql string , bindVariables map [string ]* querypb.BindVariable , options * querypb.ExecuteOptions , callback func (* sqltypes.Result ) error ) (state ReservedTransactionState , err error ) {
370- opts := WrapOpts {InTransaction : false }
370+ opts := WrapOpts {InTransaction : false , Options : options }
371371 err = ws .wrapper (ctx , target , ws .impl , "ReserveBeginStreamExecute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
372372 var innerErr error
373373 state , innerErr = conn .ReserveBeginStreamExecute (ctx , target , preQueries , postBeginQueries , sql , bindVariables , options , callback )
@@ -379,7 +379,7 @@ func (ws *wrappedService) ReserveBeginStreamExecute(ctx context.Context, target
379379// ReserveExecute implements the QueryService interface
380380func (ws * wrappedService ) ReserveExecute (ctx context.Context , target * querypb.Target , preQueries []string , sql string , bindVariables map [string ]* querypb.BindVariable , transactionID int64 , options * querypb.ExecuteOptions ) (state ReservedState , res * sqltypes.Result , err error ) {
381381 inDedicatedConn := transactionID != 0
382- opts := WrapOpts {InTransaction : inDedicatedConn }
382+ opts := WrapOpts {InTransaction : inDedicatedConn , Options : options }
383383 err = ws .wrapper (ctx , target , ws .impl , "ReserveExecute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
384384 var err error
385385 state , res , err = conn .ReserveExecute (ctx , target , preQueries , sql , bindVariables , transactionID , options )
@@ -392,7 +392,7 @@ func (ws *wrappedService) ReserveExecute(ctx context.Context, target *querypb.Ta
392392// ReserveStreamExecute implements the QueryService interface
393393func (ws * wrappedService ) ReserveStreamExecute (ctx context.Context , target * querypb.Target , preQueries []string , sql string , bindVariables map [string ]* querypb.BindVariable , transactionID int64 , options * querypb.ExecuteOptions , callback func (* sqltypes.Result ) error ) (state ReservedState , err error ) {
394394 inDedicatedConn := transactionID != 0
395- opts := WrapOpts {InTransaction : inDedicatedConn }
395+ opts := WrapOpts {InTransaction : inDedicatedConn , Options : options }
396396 err = ws .wrapper (ctx , target , ws .impl , "ReserveStreamExecute" , opts , func (ctx context.Context , target * querypb.Target , conn QueryService ) (bool , error ) {
397397 var innerErr error
398398 state , innerErr = conn .ReserveStreamExecute (ctx , target , preQueries , sql , bindVariables , transactionID , options , callback )
0 commit comments