1 Star 0 Fork 0

zhoujin826/tidb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
schema.pb.go 28.17 KB
一键复制 编辑 原始数据 按行查看 历史
Haibin Xie 提交于 2017-09-07 12:32 . vendor: update vendor for tipb (#4459)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: schema.proto
package tipb
import (
"fmt"
proto "github.com/golang/protobuf/proto"
math "math"
io "io"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type TableInfo struct {
TableId int64 `protobuf:"varint,1,opt,name=table_id,json=tableId" json:"table_id"`
Columns []*ColumnInfo `protobuf:"bytes,2,rep,name=columns" json:"columns,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *TableInfo) Reset() { *m = TableInfo{} }
func (m *TableInfo) String() string { return proto.CompactTextString(m) }
func (*TableInfo) ProtoMessage() {}
func (*TableInfo) Descriptor() ([]byte, []int) { return fileDescriptorSchema, []int{0} }
func (m *TableInfo) GetTableId() int64 {
if m != nil {
return m.TableId
}
return 0
}
func (m *TableInfo) GetColumns() []*ColumnInfo {
if m != nil {
return m.Columns
}
return nil
}
type ColumnInfo struct {
ColumnId int64 `protobuf:"varint,1,opt,name=column_id,json=columnId" json:"column_id"`
Tp int32 `protobuf:"varint,2,opt,name=tp" json:"tp"`
Collation int32 `protobuf:"varint,3,opt,name=collation" json:"collation"`
ColumnLen int32 `protobuf:"varint,4,opt,name=columnLen" json:"columnLen"`
Decimal int32 `protobuf:"varint,5,opt,name=decimal" json:"decimal"`
Flag int32 `protobuf:"varint,6,opt,name=flag" json:"flag"`
Elems []string `protobuf:"bytes,7,rep,name=elems" json:"elems,omitempty"`
DefaultVal []byte `protobuf:"bytes,8,opt,name=default_val,json=defaultVal" json:"default_val,omitempty"`
PkHandle bool `protobuf:"varint,21,opt,name=pk_handle,json=pkHandle" json:"pk_handle"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ColumnInfo) Reset() { *m = ColumnInfo{} }
func (m *ColumnInfo) String() string { return proto.CompactTextString(m) }
func (*ColumnInfo) ProtoMessage() {}
func (*ColumnInfo) Descriptor() ([]byte, []int) { return fileDescriptorSchema, []int{1} }
func (m *ColumnInfo) GetColumnId() int64 {
if m != nil {
return m.ColumnId
}
return 0
}
func (m *ColumnInfo) GetTp() int32 {
if m != nil {
return m.Tp
}
return 0
}
func (m *ColumnInfo) GetCollation() int32 {
if m != nil {
return m.Collation
}
return 0
}
func (m *ColumnInfo) GetColumnLen() int32 {
if m != nil {
return m.ColumnLen
}
return 0
}
func (m *ColumnInfo) GetDecimal() int32 {
if m != nil {
return m.Decimal
}
return 0
}
func (m *ColumnInfo) GetFlag() int32 {
if m != nil {
return m.Flag
}
return 0
}
func (m *ColumnInfo) GetElems() []string {
if m != nil {
return m.Elems
}
return nil
}
func (m *ColumnInfo) GetDefaultVal() []byte {
if m != nil {
return m.DefaultVal
}
return nil
}
func (m *ColumnInfo) GetPkHandle() bool {
if m != nil {
return m.PkHandle
}
return false
}
type IndexInfo struct {
TableId int64 `protobuf:"varint,1,opt,name=table_id,json=tableId" json:"table_id"`
IndexId int64 `protobuf:"varint,2,opt,name=index_id,json=indexId" json:"index_id"`
Columns []*ColumnInfo `protobuf:"bytes,3,rep,name=columns" json:"columns,omitempty"`
Unique bool `protobuf:"varint,4,opt,name=unique" json:"unique"`
XXX_unrecognized []byte `json:"-"`
}
func (m *IndexInfo) Reset() { *m = IndexInfo{} }
func (m *IndexInfo) String() string { return proto.CompactTextString(m) }
func (*IndexInfo) ProtoMessage() {}
func (*IndexInfo) Descriptor() ([]byte, []int) { return fileDescriptorSchema, []int{2} }
func (m *IndexInfo) GetTableId() int64 {
if m != nil {
return m.TableId
}
return 0
}
func (m *IndexInfo) GetIndexId() int64 {
if m != nil {
return m.IndexId
}
return 0
}
func (m *IndexInfo) GetColumns() []*ColumnInfo {
if m != nil {
return m.Columns
}
return nil
}
func (m *IndexInfo) GetUnique() bool {
if m != nil {
return m.Unique
}
return false
}
// 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 fileDescriptorSchema, []int{3} }
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
}
func init() {
proto.RegisterType((*TableInfo)(nil), "tipb.TableInfo")
proto.RegisterType((*ColumnInfo)(nil), "tipb.ColumnInfo")
proto.RegisterType((*IndexInfo)(nil), "tipb.IndexInfo")
proto.RegisterType((*KeyRange)(nil), "tipb.KeyRange")
}
func (m *TableInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TableInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0x8
i++
i = encodeVarintSchema(dAtA, i, uint64(m.TableId))
if len(m.Columns) > 0 {
for _, msg := range m.Columns {
dAtA[i] = 0x12
i++
i = encodeVarintSchema(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ColumnInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ColumnInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0x8
i++
i = encodeVarintSchema(dAtA, i, uint64(m.ColumnId))
dAtA[i] = 0x10
i++
i = encodeVarintSchema(dAtA, i, uint64(m.Tp))
dAtA[i] = 0x18
i++
i = encodeVarintSchema(dAtA, i, uint64(m.Collation))
dAtA[i] = 0x20
i++
i = encodeVarintSchema(dAtA, i, uint64(m.ColumnLen))
dAtA[i] = 0x28
i++
i = encodeVarintSchema(dAtA, i, uint64(m.Decimal))
dAtA[i] = 0x30
i++
i = encodeVarintSchema(dAtA, i, uint64(m.Flag))
if len(m.Elems) > 0 {
for _, s := range m.Elems {
dAtA[i] = 0x3a
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if m.DefaultVal != nil {
dAtA[i] = 0x42
i++
i = encodeVarintSchema(dAtA, i, uint64(len(m.DefaultVal)))
i += copy(dAtA[i:], m.DefaultVal)
}
dAtA[i] = 0xa8
i++
dAtA[i] = 0x1
i++
if m.PkHandle {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *IndexInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *IndexInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0x8
i++
i = encodeVarintSchema(dAtA, i, uint64(m.TableId))
dAtA[i] = 0x10
i++
i = encodeVarintSchema(dAtA, i, uint64(m.IndexId))
if len(m.Columns) > 0 {
for _, msg := range m.Columns {
dAtA[i] = 0x1a
i++
i = encodeVarintSchema(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
dAtA[i] = 0x20
i++
if m.Unique {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *KeyRange) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *KeyRange) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Low != nil {
dAtA[i] = 0xa
i++
i = encodeVarintSchema(dAtA, i, uint64(len(m.Low)))
i += copy(dAtA[i:], m.Low)
}
if m.High != nil {
dAtA[i] = 0x12
i++
i = encodeVarintSchema(dAtA, i, uint64(len(m.High)))
i += copy(dAtA[i:], m.High)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64Schema(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32Schema(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintSchema(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *TableInfo) Size() (n int) {
var l int
_ = l
n += 1 + sovSchema(uint64(m.TableId))
if len(m.Columns) > 0 {
for _, e := range m.Columns {
l = e.Size()
n += 1 + l + sovSchema(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ColumnInfo) Size() (n int) {
var l int
_ = l
n += 1 + sovSchema(uint64(m.ColumnId))
n += 1 + sovSchema(uint64(m.Tp))
n += 1 + sovSchema(uint64(m.Collation))
n += 1 + sovSchema(uint64(m.ColumnLen))
n += 1 + sovSchema(uint64(m.Decimal))
n += 1 + sovSchema(uint64(m.Flag))
if len(m.Elems) > 0 {
for _, s := range m.Elems {
l = len(s)
n += 1 + l + sovSchema(uint64(l))
}
}
if m.DefaultVal != nil {
l = len(m.DefaultVal)
n += 1 + l + sovSchema(uint64(l))
}
n += 3
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *IndexInfo) Size() (n int) {
var l int
_ = l
n += 1 + sovSchema(uint64(m.TableId))
n += 1 + sovSchema(uint64(m.IndexId))
if len(m.Columns) > 0 {
for _, e := range m.Columns {
l = e.Size()
n += 1 + l + sovSchema(uint64(l))
}
}
n += 2
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *KeyRange) Size() (n int) {
var l int
_ = l
if m.Low != nil {
l = len(m.Low)
n += 1 + l + sovSchema(uint64(l))
}
if m.High != nil {
l = len(m.High)
n += 1 + l + sovSchema(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovSchema(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozSchema(x uint64) (n int) {
return sovSchema(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *TableInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TableInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TableInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType)
}
m.TableId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TableId |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthSchema
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Columns = append(m.Columns, &ColumnInfo{})
if err := m.Columns[len(m.Columns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipSchema(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSchema
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ColumnInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ColumnInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ColumnInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ColumnId", wireType)
}
m.ColumnId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ColumnId |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Tp", wireType)
}
m.Tp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Tp |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Collation", wireType)
}
m.Collation = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Collation |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ColumnLen", wireType)
}
m.ColumnLen = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ColumnLen |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Decimal", wireType)
}
m.Decimal = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Decimal |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Flag", wireType)
}
m.Flag = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Flag |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Elems", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthSchema
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Elems = append(m.Elems, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DefaultVal", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthSchema
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DefaultVal = append(m.DefaultVal[:0], dAtA[iNdEx:postIndex]...)
if m.DefaultVal == nil {
m.DefaultVal = []byte{}
}
iNdEx = postIndex
case 21:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PkHandle", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.PkHandle = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipSchema(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSchema
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *IndexInfo) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: IndexInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: IndexInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType)
}
m.TableId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TableId |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field IndexId", wireType)
}
m.IndexId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.IndexId |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthSchema
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Columns = append(m.Columns, &ColumnInfo{})
if err := m.Columns[len(m.Columns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Unique", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Unique = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipSchema(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSchema
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *KeyRange) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: KeyRange: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: KeyRange: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Low", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthSchema
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Low = append(m.Low[:0], dAtA[iNdEx:postIndex]...)
if m.Low == nil {
m.Low = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field High", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSchema
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthSchema
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.High = append(m.High[:0], dAtA[iNdEx:postIndex]...)
if m.High == nil {
m.High = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipSchema(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSchema
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipSchema(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSchema
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSchema
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSchema
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthSchema
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSchema
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipSchema(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthSchema = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowSchema = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("schema.proto", fileDescriptorSchema) }
var fileDescriptorSchema = []byte{
// 398 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x8e, 0xd3, 0x30,
0x10, 0xc6, 0xd7, 0x49, 0xba, 0x4d, 0x67, 0x7b, 0x58, 0x59, 0x5d, 0xc9, 0x42, 0x28, 0x0d, 0x39,
0x05, 0x0e, 0x01, 0xf1, 0x08, 0xcb, 0x85, 0x0a, 0x0e, 0x28, 0x42, 0x88, 0x5b, 0xe5, 0xc6, 0x6e,
0x62, 0xad, 0x63, 0x1b, 0xea, 0xf0, 0xe7, 0x49, 0xe0, 0xca, 0xdb, 0xec, 0x91, 0x27, 0x40, 0xa8,
0xbc, 0x08, 0xb2, 0x93, 0x68, 0x43, 0x2f, 0xec, 0x6d, 0xfc, 0xfb, 0x3e, 0x8f, 0xbe, 0x99, 0x81,
0xe5, 0xa1, 0x6a, 0x78, 0x4b, 0x0b, 0xf3, 0x51, 0x5b, 0x8d, 0x23, 0x2b, 0xcc, 0xee, 0xc1, 0xaa,
0xd6, 0xb5, 0xf6, 0xe0, 0xa9, 0xab, 0x7a, 0x2d, 0x7b, 0x0f, 0x8b, 0xb7, 0x74, 0x27, 0xf9, 0x46,
0xed, 0x35, 0x5e, 0x43, 0x6c, 0xdd, 0x63, 0x2b, 0x18, 0x41, 0x29, 0xca, 0xc3, 0xeb, 0xe8, 0xf6,
0xd7, 0xfa, 0xac, 0x9c, 0x7b, 0xba, 0x61, 0xf8, 0x09, 0xcc, 0x2b, 0x2d, 0xbb, 0x56, 0x1d, 0x48,
0x90, 0x86, 0xf9, 0xc5, 0xf3, 0xcb, 0xc2, 0xf5, 0x2e, 0x5e, 0x78, 0xe8, 0x7a, 0x94, 0xa3, 0x21,
0xfb, 0x11, 0x00, 0xdc, 0x71, 0xfc, 0x08, 0x16, 0xbd, 0x72, 0xda, 0x3c, 0xee, 0xf1, 0x86, 0xe1,
0x15, 0x04, 0xd6, 0x90, 0x20, 0x45, 0xf9, 0x6c, 0xd0, 0x02, 0x6b, 0x70, 0xe6, 0x3f, 0x4a, 0x6a,
0x85, 0x56, 0x24, 0x9c, 0x88, 0x77, 0x78, 0xf0, 0x74, 0xad, 0x7a, 0xcd, 0x15, 0x89, 0x4e, 0x3c,
0x3d, 0xc6, 0x09, 0xcc, 0x19, 0xaf, 0x44, 0x4b, 0x25, 0x99, 0x4d, 0x1c, 0x23, 0xc4, 0x04, 0xa2,
0xbd, 0xa4, 0x35, 0x39, 0x9f, 0x88, 0x9e, 0xe0, 0x15, 0xcc, 0xb8, 0xe4, 0xed, 0x81, 0xcc, 0xd3,
0x30, 0x5f, 0x94, 0xfd, 0x03, 0xaf, 0xe1, 0x82, 0xf1, 0x3d, 0xed, 0xa4, 0xdd, 0x7e, 0xa2, 0x92,
0xc4, 0x29, 0xca, 0x97, 0x25, 0x0c, 0xe8, 0x1d, 0x95, 0x6e, 0x62, 0x73, 0xb3, 0x6d, 0xa8, 0x62,
0x92, 0x93, 0xab, 0x14, 0xe5, 0xf1, 0x38, 0xb1, 0xb9, 0x79, 0xe9, 0x69, 0xf6, 0x0d, 0xc1, 0x62,
0xa3, 0x18, 0xff, 0x72, 0xbf, 0xf5, 0xaf, 0x21, 0x16, 0xce, 0xed, 0x0c, 0xc1, 0xd4, 0xe0, 0xe9,
0xbf, 0xf7, 0x09, 0xff, 0x73, 0x1f, 0xfc, 0x10, 0xce, 0x3b, 0x25, 0x3e, 0x74, 0xdc, 0x2f, 0x6c,
0xcc, 0x36, 0xb0, 0xec, 0x19, 0xc4, 0xaf, 0xf8, 0xd7, 0x92, 0xaa, 0x9a, 0xe3, 0x4b, 0x08, 0xa5,
0xfe, 0xec, 0x23, 0x2d, 0x4b, 0x57, 0x62, 0x0c, 0x51, 0x23, 0xea, 0xc6, 0x87, 0x58, 0x96, 0xbe,
0xbe, 0x7e, 0x7c, 0x7b, 0x4c, 0xd0, 0xcf, 0x63, 0x82, 0x7e, 0x1f, 0x13, 0xf4, 0xfd, 0x4f, 0x72,
0x06, 0x57, 0x95, 0x6e, 0x0b, 0x23, 0x54, 0x5d, 0x51, 0x53, 0x58, 0xc1, 0x76, 0x3e, 0xcc, 0x1b,
0xf4, 0x37, 0x00, 0x00, 0xff, 0xff, 0x75, 0x06, 0xaa, 0x3a, 0x9f, 0x02, 0x00, 0x00,
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhoujin826/tidb.git
git@gitee.com:zhoujin826/tidb.git
zhoujin826
tidb
tidb
v1.0.9

搜索帮助