@@ -86,18 +86,19 @@ func echoQueryResult(vals map[string]interface{}) *sqltypes.Result {
8686 return qr
8787}
8888
89- func (c * echoClient ) Execute (ctx context.Context , sql string , bindVariables map [string ]interface {}, tabletType topodatapb.TabletType , session * vtgatepb.Session , notInTransaction bool ) (* sqltypes.Result , error ) {
89+ func (c * echoClient ) Execute (ctx context.Context , sql string , bindVariables map [string ]interface {}, keyspace string , tabletType topodatapb.TabletType , session * vtgatepb.Session , notInTransaction bool ) (* sqltypes.Result , error ) {
9090 if strings .HasPrefix (sql , EchoPrefix ) {
9191 return echoQueryResult (map [string ]interface {}{
9292 "callerId" : callerid .EffectiveCallerIDFromContext (ctx ),
9393 "query" : sql ,
9494 "bindVars" : bindVariables ,
95+ "keyspace" : keyspace ,
9596 "tabletType" : tabletType ,
9697 "session" : session ,
9798 "notInTransaction" : notInTransaction ,
9899 }), nil
99100 }
100- return c .fallbackClient .Execute (ctx , sql , bindVariables , tabletType , session , notInTransaction )
101+ return c .fallbackClient .Execute (ctx , sql , bindVariables , keyspace , tabletType , session , notInTransaction )
101102}
102103
103104func (c * echoClient ) ExecuteShards (ctx context.Context , sql string , bindVariables map [string ]interface {}, keyspace string , shards []string , tabletType topodatapb.TabletType , session * vtgatepb.Session , notInTransaction bool ) (* sqltypes.Result , error ) {
@@ -205,17 +206,18 @@ func (c *echoClient) ExecuteBatchKeyspaceIds(ctx context.Context, queries []*vtg
205206 return c .fallbackClient .ExecuteBatchKeyspaceIds (ctx , queries , tabletType , asTransaction , session )
206207}
207208
208- func (c * echoClient ) StreamExecute (ctx context.Context , sql string , bindVariables map [string ]interface {}, tabletType topodatapb.TabletType , sendReply func (* sqltypes.Result ) error ) error {
209+ func (c * echoClient ) StreamExecute (ctx context.Context , sql string , bindVariables map [string ]interface {}, keyspace string , tabletType topodatapb.TabletType , sendReply func (* sqltypes.Result ) error ) error {
209210 if strings .HasPrefix (sql , EchoPrefix ) {
210211 sendReply (echoQueryResult (map [string ]interface {}{
211212 "callerId" : callerid .EffectiveCallerIDFromContext (ctx ),
212213 "query" : sql ,
213214 "bindVars" : bindVariables ,
215+ "keyspace" : keyspace ,
214216 "tabletType" : tabletType ,
215217 }))
216218 return nil
217219 }
218- return c .fallbackClient .StreamExecute (ctx , sql , bindVariables , tabletType , sendReply )
220+ return c .fallbackClient .StreamExecute (ctx , sql , bindVariables , keyspace , tabletType , sendReply )
219221}
220222
221223func (c * echoClient ) StreamExecuteShards (ctx context.Context , sql string , bindVariables map [string ]interface {}, keyspace string , shards []string , tabletType topodatapb.TabletType , sendReply func (* sqltypes.Result ) error ) error {
0 commit comments