forked from dolthub/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
queryservice.pb.go
438 lines (390 loc) · 14.9 KB
/
queryservice.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
// Code generated by protoc-gen-go.
// source: queryservice.proto
// DO NOT EDIT!
/*
Package queryservice is a generated protocol buffer package.
It is generated from these files:
queryservice.proto
It has these top-level messages:
*/
package queryservice
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import query "github.com/youtube/vitess/go/vt/proto/query"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion1
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion1
// Client API for Query service
type QueryClient interface {
// GetSessionId gets a session id from the server. This call is being
// deprecated in favor of using the Target field of the subsequent
// queries, but is still here for backward compatibility.
GetSessionId(ctx context.Context, in *query.GetSessionIdRequest, opts ...grpc.CallOption) (*query.GetSessionIdResponse, error)
// Execute executes the specified SQL query (might be in a
// transaction context, if Query.transaction_id is set).
Execute(ctx context.Context, in *query.ExecuteRequest, opts ...grpc.CallOption) (*query.ExecuteResponse, error)
// ExecuteBatch executes a list of queries, and returns the result
// for each query.
ExecuteBatch(ctx context.Context, in *query.ExecuteBatchRequest, opts ...grpc.CallOption) (*query.ExecuteBatchResponse, error)
// StreamExecute executes a streaming query. Use this method if the
// query returns a large number of rows. The first QueryResult will
// contain the Fields, subsequent QueryResult messages will contain
// the rows.
StreamExecute(ctx context.Context, in *query.StreamExecuteRequest, opts ...grpc.CallOption) (Query_StreamExecuteClient, error)
// Begin a transaction.
Begin(ctx context.Context, in *query.BeginRequest, opts ...grpc.CallOption) (*query.BeginResponse, error)
// Commit a transaction.
Commit(ctx context.Context, in *query.CommitRequest, opts ...grpc.CallOption) (*query.CommitResponse, error)
// Rollback a transaction.
Rollback(ctx context.Context, in *query.RollbackRequest, opts ...grpc.CallOption) (*query.RollbackResponse, error)
// SplitQuery is the API to facilitate MapReduce-type iterations
// over large data sets (like full table dumps).
SplitQuery(ctx context.Context, in *query.SplitQueryRequest, opts ...grpc.CallOption) (*query.SplitQueryResponse, error)
// StreamHealth runs a streaming RPC to the tablet, that returns the
// current health of the tablet on a regular basis.
StreamHealth(ctx context.Context, in *query.StreamHealthRequest, opts ...grpc.CallOption) (Query_StreamHealthClient, error)
}
type queryClient struct {
cc *grpc.ClientConn
}
func NewQueryClient(cc *grpc.ClientConn) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) GetSessionId(ctx context.Context, in *query.GetSessionIdRequest, opts ...grpc.CallOption) (*query.GetSessionIdResponse, error) {
out := new(query.GetSessionIdResponse)
err := grpc.Invoke(ctx, "/queryservice.Query/GetSessionId", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Execute(ctx context.Context, in *query.ExecuteRequest, opts ...grpc.CallOption) (*query.ExecuteResponse, error) {
out := new(query.ExecuteResponse)
err := grpc.Invoke(ctx, "/queryservice.Query/Execute", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ExecuteBatch(ctx context.Context, in *query.ExecuteBatchRequest, opts ...grpc.CallOption) (*query.ExecuteBatchResponse, error) {
out := new(query.ExecuteBatchResponse)
err := grpc.Invoke(ctx, "/queryservice.Query/ExecuteBatch", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) StreamExecute(ctx context.Context, in *query.StreamExecuteRequest, opts ...grpc.CallOption) (Query_StreamExecuteClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Query_serviceDesc.Streams[0], c.cc, "/queryservice.Query/StreamExecute", opts...)
if err != nil {
return nil, err
}
x := &queryStreamExecuteClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Query_StreamExecuteClient interface {
Recv() (*query.StreamExecuteResponse, error)
grpc.ClientStream
}
type queryStreamExecuteClient struct {
grpc.ClientStream
}
func (x *queryStreamExecuteClient) Recv() (*query.StreamExecuteResponse, error) {
m := new(query.StreamExecuteResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *queryClient) Begin(ctx context.Context, in *query.BeginRequest, opts ...grpc.CallOption) (*query.BeginResponse, error) {
out := new(query.BeginResponse)
err := grpc.Invoke(ctx, "/queryservice.Query/Begin", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Commit(ctx context.Context, in *query.CommitRequest, opts ...grpc.CallOption) (*query.CommitResponse, error) {
out := new(query.CommitResponse)
err := grpc.Invoke(ctx, "/queryservice.Query/Commit", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Rollback(ctx context.Context, in *query.RollbackRequest, opts ...grpc.CallOption) (*query.RollbackResponse, error) {
out := new(query.RollbackResponse)
err := grpc.Invoke(ctx, "/queryservice.Query/Rollback", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) SplitQuery(ctx context.Context, in *query.SplitQueryRequest, opts ...grpc.CallOption) (*query.SplitQueryResponse, error) {
out := new(query.SplitQueryResponse)
err := grpc.Invoke(ctx, "/queryservice.Query/SplitQuery", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) StreamHealth(ctx context.Context, in *query.StreamHealthRequest, opts ...grpc.CallOption) (Query_StreamHealthClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Query_serviceDesc.Streams[1], c.cc, "/queryservice.Query/StreamHealth", opts...)
if err != nil {
return nil, err
}
x := &queryStreamHealthClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Query_StreamHealthClient interface {
Recv() (*query.StreamHealthResponse, error)
grpc.ClientStream
}
type queryStreamHealthClient struct {
grpc.ClientStream
}
func (x *queryStreamHealthClient) Recv() (*query.StreamHealthResponse, error) {
m := new(query.StreamHealthResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for Query service
type QueryServer interface {
// GetSessionId gets a session id from the server. This call is being
// deprecated in favor of using the Target field of the subsequent
// queries, but is still here for backward compatibility.
GetSessionId(context.Context, *query.GetSessionIdRequest) (*query.GetSessionIdResponse, error)
// Execute executes the specified SQL query (might be in a
// transaction context, if Query.transaction_id is set).
Execute(context.Context, *query.ExecuteRequest) (*query.ExecuteResponse, error)
// ExecuteBatch executes a list of queries, and returns the result
// for each query.
ExecuteBatch(context.Context, *query.ExecuteBatchRequest) (*query.ExecuteBatchResponse, error)
// StreamExecute executes a streaming query. Use this method if the
// query returns a large number of rows. The first QueryResult will
// contain the Fields, subsequent QueryResult messages will contain
// the rows.
StreamExecute(*query.StreamExecuteRequest, Query_StreamExecuteServer) error
// Begin a transaction.
Begin(context.Context, *query.BeginRequest) (*query.BeginResponse, error)
// Commit a transaction.
Commit(context.Context, *query.CommitRequest) (*query.CommitResponse, error)
// Rollback a transaction.
Rollback(context.Context, *query.RollbackRequest) (*query.RollbackResponse, error)
// SplitQuery is the API to facilitate MapReduce-type iterations
// over large data sets (like full table dumps).
SplitQuery(context.Context, *query.SplitQueryRequest) (*query.SplitQueryResponse, error)
// StreamHealth runs a streaming RPC to the tablet, that returns the
// current health of the tablet on a regular basis.
StreamHealth(*query.StreamHealthRequest, Query_StreamHealthServer) error
}
func RegisterQueryServer(s *grpc.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
}
func _Query_GetSessionId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(query.GetSessionIdRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(QueryServer).GetSessionId(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _Query_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(query.ExecuteRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(QueryServer).Execute(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _Query_ExecuteBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(query.ExecuteBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(QueryServer).ExecuteBatch(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _Query_StreamExecute_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(query.StreamExecuteRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(QueryServer).StreamExecute(m, &queryStreamExecuteServer{stream})
}
type Query_StreamExecuteServer interface {
Send(*query.StreamExecuteResponse) error
grpc.ServerStream
}
type queryStreamExecuteServer struct {
grpc.ServerStream
}
func (x *queryStreamExecuteServer) Send(m *query.StreamExecuteResponse) error {
return x.ServerStream.SendMsg(m)
}
func _Query_Begin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(query.BeginRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(QueryServer).Begin(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _Query_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(query.CommitRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(QueryServer).Commit(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _Query_Rollback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(query.RollbackRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(QueryServer).Rollback(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _Query_SplitQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(query.SplitQueryRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(QueryServer).SplitQuery(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _Query_StreamHealth_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(query.StreamHealthRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(QueryServer).StreamHealth(m, &queryStreamHealthServer{stream})
}
type Query_StreamHealthServer interface {
Send(*query.StreamHealthResponse) error
grpc.ServerStream
}
type queryStreamHealthServer struct {
grpc.ServerStream
}
func (x *queryStreamHealthServer) Send(m *query.StreamHealthResponse) error {
return x.ServerStream.SendMsg(m)
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "queryservice.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetSessionId",
Handler: _Query_GetSessionId_Handler,
},
{
MethodName: "Execute",
Handler: _Query_Execute_Handler,
},
{
MethodName: "ExecuteBatch",
Handler: _Query_ExecuteBatch_Handler,
},
{
MethodName: "Begin",
Handler: _Query_Begin_Handler,
},
{
MethodName: "Commit",
Handler: _Query_Commit_Handler,
},
{
MethodName: "Rollback",
Handler: _Query_Rollback_Handler,
},
{
MethodName: "SplitQuery",
Handler: _Query_SplitQuery_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamExecute",
Handler: _Query_StreamExecute_Handler,
ServerStreams: true,
},
{
StreamName: "StreamHealth",
Handler: _Query_StreamHealth_Handler,
ServerStreams: true,
},
},
}
var fileDescriptor0 = []byte{
// 281 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x92, 0xdd, 0x4a, 0xc3, 0x40,
0x10, 0x85, 0x15, 0x6c, 0x95, 0x31, 0xde, 0x8c, 0xd6, 0x9f, 0xe8, 0x95, 0x0f, 0x50, 0x44, 0x05,
0x41, 0xf0, 0xa6, 0x45, 0xb4, 0x08, 0x82, 0xcd, 0x13, 0xa4, 0x71, 0xd0, 0xc5, 0x24, 0x1b, 0xb3,
0x53, 0xd1, 0x47, 0xf6, 0x2d, 0xac, 0xd9, 0xcc, 0x26, 0xd9,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