303 lines
9.8 KiB
Go
303 lines
9.8 KiB
Go
// Code generated by protoc-gen-go.
|
|
// source: select.proto
|
|
// DO NOT EDIT!
|
|
|
|
package tipb
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// KeyRange is the encoded index key range, low is closed, high is open. (low <= x < high)
|
|
type KeyRange struct {
|
|
Low []byte `protobuf:"bytes,1,opt,name=low" json:"low,omitempty"`
|
|
High []byte `protobuf:"bytes,2,opt,name=high" json:"high,omitempty"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
}
|
|
|
|
func (m *KeyRange) Reset() { *m = KeyRange{} }
|
|
func (m *KeyRange) String() string { return proto.CompactTextString(m) }
|
|
func (*KeyRange) ProtoMessage() {}
|
|
func (*KeyRange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
|
|
|
|
func (m *KeyRange) GetLow() []byte {
|
|
if m != nil {
|
|
return m.Low
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *KeyRange) GetHigh() []byte {
|
|
if m != nil {
|
|
return m.High
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ByItem type for group by and order by.
|
|
type ByItem struct {
|
|
Expr *Expr `protobuf:"bytes,1,opt,name=expr" json:"expr,omitempty"`
|
|
Desc *bool `protobuf:"varint,2,opt,name=desc" json:"desc,omitempty"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
}
|
|
|
|
func (m *ByItem) Reset() { *m = ByItem{} }
|
|
func (m *ByItem) String() string { return proto.CompactTextString(m) }
|
|
func (*ByItem) ProtoMessage() {}
|
|
func (*ByItem) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
|
|
|
|
func (m *ByItem) GetExpr() *Expr {
|
|
if m != nil {
|
|
return m.Expr
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ByItem) GetDesc() bool {
|
|
if m != nil && m.Desc != nil {
|
|
return *m.Desc
|
|
}
|
|
return false
|
|
}
|
|
|
|
// SelectRequest works like a simplified select statement.
|
|
type SelectRequest struct {
|
|
// transaction start timestamp.
|
|
StartTs *int64 `protobuf:"varint,1,opt,name=start_ts" json:"start_ts,omitempty"`
|
|
// If table_info is not null, it represents a table scan, index_info would be null.
|
|
TableInfo *TableInfo `protobuf:"bytes,2,opt,name=table_info" json:"table_info,omitempty"`
|
|
// If index_info is not null, it represents an index scan, table_info would be null.
|
|
IndexInfo *IndexInfo `protobuf:"bytes,3,opt,name=index_info" json:"index_info,omitempty"`
|
|
// fields to be selected, fields type can be column reference for simple scan.
|
|
// or aggregation function. If no fields specified, only handle will be returned.
|
|
Fields []*Expr `protobuf:"bytes,4,rep,name=fields" json:"fields,omitempty"`
|
|
// disjoint handle ranges to be scanned.
|
|
Ranges []*KeyRange `protobuf:"bytes,5,rep,name=ranges" json:"ranges,omitempty"`
|
|
// distinct result.
|
|
Distinct *bool `protobuf:"varint,6,opt,name=distinct" json:"distinct,omitempty"`
|
|
// where condition.
|
|
Where *Expr `protobuf:"bytes,7,opt,name=where" json:"where,omitempty"`
|
|
// group by clause.
|
|
GroupBy []*ByItem `protobuf:"bytes,8,rep,name=group_by" json:"group_by,omitempty"`
|
|
// having clause.
|
|
Having *Expr `protobuf:"bytes,9,opt,name=having" json:"having,omitempty"`
|
|
// order by clause.
|
|
OrderBy []*ByItem `protobuf:"bytes,10,rep,name=order_by" json:"order_by,omitempty"`
|
|
// offset of the result.
|
|
Offset *int64 `protobuf:"varint,11,opt,name=offset" json:"offset,omitempty"`
|
|
// limit the result to be returned.
|
|
Limit *int64 `protobuf:"varint,12,opt,name=limit" json:"limit,omitempty"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
}
|
|
|
|
func (m *SelectRequest) Reset() { *m = SelectRequest{} }
|
|
func (m *SelectRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*SelectRequest) ProtoMessage() {}
|
|
func (*SelectRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
|
|
|
|
func (m *SelectRequest) GetStartTs() int64 {
|
|
if m != nil && m.StartTs != nil {
|
|
return *m.StartTs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SelectRequest) GetTableInfo() *TableInfo {
|
|
if m != nil {
|
|
return m.TableInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetIndexInfo() *IndexInfo {
|
|
if m != nil {
|
|
return m.IndexInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetFields() []*Expr {
|
|
if m != nil {
|
|
return m.Fields
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetRanges() []*KeyRange {
|
|
if m != nil {
|
|
return m.Ranges
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetDistinct() bool {
|
|
if m != nil && m.Distinct != nil {
|
|
return *m.Distinct
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *SelectRequest) GetWhere() *Expr {
|
|
if m != nil {
|
|
return m.Where
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetGroupBy() []*ByItem {
|
|
if m != nil {
|
|
return m.GroupBy
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetHaving() *Expr {
|
|
if m != nil {
|
|
return m.Having
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetOrderBy() []*ByItem {
|
|
if m != nil {
|
|
return m.OrderBy
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectRequest) GetOffset() int64 {
|
|
if m != nil && m.Offset != nil {
|
|
return *m.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SelectRequest) GetLimit() int64 {
|
|
if m != nil && m.Limit != nil {
|
|
return *m.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// values are all in text format.
|
|
type Row struct {
|
|
Handle []byte `protobuf:"bytes,1,opt,name=handle" json:"handle,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
}
|
|
|
|
func (m *Row) Reset() { *m = Row{} }
|
|
func (m *Row) String() string { return proto.CompactTextString(m) }
|
|
func (*Row) ProtoMessage() {}
|
|
func (*Row) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
|
|
|
|
func (m *Row) GetHandle() []byte {
|
|
if m != nil {
|
|
return m.Handle
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Row) GetData() []byte {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Error struct {
|
|
Code *int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
|
|
Msg *string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
}
|
|
|
|
func (m *Error) Reset() { *m = Error{} }
|
|
func (m *Error) String() string { return proto.CompactTextString(m) }
|
|
func (*Error) ProtoMessage() {}
|
|
func (*Error) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
|
|
|
|
func (m *Error) GetCode() int32 {
|
|
if m != nil && m.Code != nil {
|
|
return *m.Code
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Error) GetMsg() string {
|
|
if m != nil && m.Msg != nil {
|
|
return *m.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Response for SelectRequest.
|
|
type SelectResponse struct {
|
|
Error *Error `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
|
|
// Result rows.
|
|
Rows []*Row `protobuf:"bytes,2,rep,name=rows" json:"rows,omitempty"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
}
|
|
|
|
func (m *SelectResponse) Reset() { *m = SelectResponse{} }
|
|
func (m *SelectResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*SelectResponse) ProtoMessage() {}
|
|
func (*SelectResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
|
|
|
|
func (m *SelectResponse) GetError() *Error {
|
|
if m != nil {
|
|
return m.Error
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SelectResponse) GetRows() []*Row {
|
|
if m != nil {
|
|
return m.Rows
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*KeyRange)(nil), "tipb.KeyRange")
|
|
proto.RegisterType((*ByItem)(nil), "tipb.ByItem")
|
|
proto.RegisterType((*SelectRequest)(nil), "tipb.SelectRequest")
|
|
proto.RegisterType((*Row)(nil), "tipb.Row")
|
|
proto.RegisterType((*Error)(nil), "tipb.Error")
|
|
proto.RegisterType((*SelectResponse)(nil), "tipb.SelectResponse")
|
|
}
|
|
|
|
var fileDescriptor2 = []byte{
|
|
// 403 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x51, 0xc9, 0x6e, 0xdb, 0x30,
|
|
0x10, 0x85, 0xa3, 0xa5, 0xf2, 0x48, 0x71, 0x03, 0x01, 0x45, 0x19, 0x1f, 0x82, 0x40, 0x41, 0x81,
|
|
0x9e, 0x8c, 0x22, 0x9f, 0x10, 0xc0, 0x07, 0xa3, 0x97, 0xc2, 0xed, 0xdd, 0xa0, 0xc5, 0xb1, 0x44,
|
|
0x40, 0x22, 0x55, 0x0e, 0x53, 0xc7, 0x5f, 0xd9, 0x5f, 0x2a, 0x17, 0x77, 0x41, 0xe3, 0xe3, 0xbc,
|
|
0x65, 0xf8, 0x86, 0x0f, 0x2a, 0xc2, 0x01, 0x5b, 0xbb, 0x9a, 0x8c, 0xb6, 0xba, 0x4e, 0xad, 0x9c,
|
|
0xf6, 0xcb, 0x1b, 0x7c, 0x99, 0x0c, 0x12, 0x49, 0xad, 0x22, 0xbe, 0xac, 0xa8, 0xed, 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