@@ -46,6 +46,28 @@ func (tx *transaction) Execute(
4646 query string , params * table.QueryParameters ,
4747 opts ... options.ExecuteDataQueryOption ,
4848) (r result.Result , err error ) {
49+ q := new (dataQuery )
50+ q .initFromText (query )
51+
52+ if params == nil {
53+ params = table .NewQueryParameters ()
54+ }
55+ var optsResult options.ExecuteDataQueryDesc
56+ for _ , f := range opts {
57+ f (& optsResult )
58+ }
59+ onDone := trace .TableOnSessionTransactionExecute (
60+ tx .s .config .Trace (),
61+ & ctx ,
62+ tx .s ,
63+ tx ,
64+ q ,
65+ params ,
66+ optsResult .QueryCachePolicy .GetKeepInCache (),
67+ )
68+ defer func () {
69+ onDone (r , err )
70+ }()
4971 _ , r , err = tx .s .Execute (ctx , tx .txc (), query , params , opts ... )
5072 return
5173}
@@ -56,6 +78,23 @@ func (tx *transaction) ExecuteStatement(
5678 stmt table.Statement , params * table.QueryParameters ,
5779 opts ... options.ExecuteDataQueryOption ,
5880) (r result.Result , err error ) {
81+ if params == nil {
82+ params = table .NewQueryParameters ()
83+ }
84+ var optsResult options.ExecuteDataQueryDesc
85+ for _ , f := range opts {
86+ f (& optsResult )
87+ }
88+ onDone := trace .TableOnSessionTransactionExecuteStatement (
89+ tx .s .config .Trace (),
90+ & ctx ,
91+ tx .s ,
92+ tx ,
93+ params ,
94+ )
95+ defer func () {
96+ onDone (r , err )
97+ }()
5998 _ , r , err = stmt .Execute (ctx , tx .txc (), params , opts ... )
6099 return
61100}
0 commit comments