github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/sessiondatapb/session_migration.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: sql/sessiondatapb/session_migration.proto 3 4 package sessiondatapb 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 github_com_lib_pq_oid "github.com/lib/pq/oid" 11 io "io" 12 math "math" 13 math_bits "math/bits" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 // MigratableSession represents a serialization of a session that can be 28 // migrated between SQL sessions. 29 type MigratableSession struct { 30 SessionData SessionData `protobuf:"bytes,1,opt,name=session_data,json=sessionData,proto3" json:"session_data"` 31 LocalOnlySessionData LocalOnlySessionData `protobuf:"bytes,2,opt,name=local_only_session_data,json=localOnlySessionData,proto3" json:"local_only_session_data"` 32 PreparedStatements []MigratableSession_PreparedStatement `protobuf:"bytes,3,rep,name=prepared_statements,json=preparedStatements,proto3" json:"prepared_statements"` 33 } 34 35 func (m *MigratableSession) Reset() { *m = MigratableSession{} } 36 func (m *MigratableSession) String() string { return proto.CompactTextString(m) } 37 func (*MigratableSession) ProtoMessage() {} 38 func (*MigratableSession) Descriptor() ([]byte, []int) { 39 return fileDescriptor_e44b77d7af899ce0, []int{0} 40 } 41 func (m *MigratableSession) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *MigratableSession) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 b = b[:cap(b)] 46 n, err := m.MarshalToSizedBuffer(b) 47 if err != nil { 48 return nil, err 49 } 50 return b[:n], nil 51 } 52 func (m *MigratableSession) XXX_Merge(src proto.Message) { 53 xxx_messageInfo_MigratableSession.Merge(m, src) 54 } 55 func (m *MigratableSession) XXX_Size() int { 56 return m.Size() 57 } 58 func (m *MigratableSession) XXX_DiscardUnknown() { 59 xxx_messageInfo_MigratableSession.DiscardUnknown(m) 60 } 61 62 var xxx_messageInfo_MigratableSession proto.InternalMessageInfo 63 64 // PreparedStatement represents a prepared statement in a migratable session. 65 type MigratableSession_PreparedStatement struct { 66 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 67 PlaceholderTypeHints []github_com_lib_pq_oid.Oid `protobuf:"varint,2,rep,packed,name=placeholder_type_hints,json=placeholderTypeHints,proto3,customtype=github.com/lib/pq/oid.Oid" json:"placeholder_type_hints,omitempty"` 68 SQL string `protobuf:"bytes,3,opt,name=sql,proto3" json:"sql,omitempty"` 69 } 70 71 func (m *MigratableSession_PreparedStatement) Reset() { *m = MigratableSession_PreparedStatement{} } 72 func (m *MigratableSession_PreparedStatement) String() string { return proto.CompactTextString(m) } 73 func (*MigratableSession_PreparedStatement) ProtoMessage() {} 74 func (*MigratableSession_PreparedStatement) Descriptor() ([]byte, []int) { 75 return fileDescriptor_e44b77d7af899ce0, []int{0, 0} 76 } 77 func (m *MigratableSession_PreparedStatement) XXX_Unmarshal(b []byte) error { 78 return m.Unmarshal(b) 79 } 80 func (m *MigratableSession_PreparedStatement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 81 b = b[:cap(b)] 82 n, err := m.MarshalToSizedBuffer(b) 83 if err != nil { 84 return nil, err 85 } 86 return b[:n], nil 87 } 88 func (m *MigratableSession_PreparedStatement) XXX_Merge(src proto.Message) { 89 xxx_messageInfo_MigratableSession_PreparedStatement.Merge(m, src) 90 } 91 func (m *MigratableSession_PreparedStatement) XXX_Size() int { 92 return m.Size() 93 } 94 func (m *MigratableSession_PreparedStatement) XXX_DiscardUnknown() { 95 xxx_messageInfo_MigratableSession_PreparedStatement.DiscardUnknown(m) 96 } 97 98 var xxx_messageInfo_MigratableSession_PreparedStatement proto.InternalMessageInfo 99 100 func init() { 101 proto.RegisterType((*MigratableSession)(nil), "cockroach.parser.sql.sessiondatapb.MigratableSession") 102 proto.RegisterType((*MigratableSession_PreparedStatement)(nil), "cockroach.parser.sql.sessiondatapb.MigratableSession.PreparedStatement") 103 } 104 105 func init() { 106 proto.RegisterFile("sql/sessiondatapb/session_migration.proto", fileDescriptor_e44b77d7af899ce0) 107 } 108 109 var fileDescriptor_e44b77d7af899ce0 = []byte{ 110 // 406 bytes of a gzipped FileDescriptorProto 111 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xbf, 0x8e, 0xd3, 0x30, 112 0x18, 0x4f, 0x2e, 0x27, 0x10, 0x2e, 0x0c, 0x67, 0x2a, 0xc8, 0x15, 0xe1, 0x56, 0x88, 0x21, 0x2c, 113 0x8e, 0x38, 0x24, 0x66, 0x14, 0x31, 0x30, 0x1c, 0x3a, 0x2e, 0x61, 0x40, 0x2c, 0x91, 0x93, 0x58, 114 0x89, 0x75, 0x4e, 0xec, 0xc4, 0x46, 0x28, 0x6f, 0xc1, 0xc6, 0x2b, 0x75, 0xec, 0x58, 0x31, 0x54, 115 0x90, 0x4e, 0xbc, 0x05, 0x4a, 0x9a, 0xd2, 0x42, 0xae, 0xdd, 0xbe, 0x3f, 0xbf, 0x7f, 0xfa, 0xf4, 116 0x81, 0x17, 0xaa, 0xe4, 0xae, 0xa2, 0x4a, 0x31, 0x51, 0x24, 0x44, 0x13, 0x19, 0x6d, 0xbb, 0x30, 117 0x67, 0x69, 0x45, 0x34, 0x13, 0x05, 0x96, 0x95, 0xd0, 0x02, 0x3e, 0x89, 0x45, 0x7c, 0x53, 0x09, 118 0x12, 0x67, 0x58, 0x95, 0x1c, 0xff, 0x43, 0x9a, 0x8c, 0x53, 0x91, 0x8a, 0x0e, 0xe7, 0xb6, 0xd5, 119 0x86, 0x32, 0x79, 0x7e, 0x58, 0xbd, 0x6d, 0x7b, 0x94, 0x3b, 0x44, 0x71, 0x11, 0x13, 0x1e, 0x8a, 120 0x82, 0xd7, 0xe1, 0x90, 0xf0, 0xec, 0xb7, 0x05, 0xce, 0xde, 0x77, 0xe9, 0x48, 0xc4, 0x69, 0xb0, 121 0x01, 0xc0, 0x6b, 0x70, 0x7f, 0x1f, 0x6b, 0x9b, 0x33, 0xd3, 0x19, 0x5d, 0x38, 0xf8, 0x48, 0x6c, 122 0xdc, 0x73, 0xdf, 0x12, 0x4d, 0xbc, 0xd3, 0xf9, 0x6a, 0x6a, 0xf8, 0x23, 0xb5, 0x1b, 0xc1, 0x02, 123 0x3c, 0x3e, 0x90, 0xc4, 0x3e, 0xe9, 0xd4, 0x5f, 0x1e, 0x55, 0xbf, 0x6c, 0xb9, 0x57, 0x05, 0xaf, 124 0x87, 0x36, 0x63, 0x7e, 0xcb, 0x0e, 0x7e, 0x05, 0x0f, 0x65, 0x45, 0x25, 0xa9, 0x68, 0x12, 0x2a, 125 0x4d, 0x34, 0xcd, 0x69, 0xa1, 0x95, 0x6d, 0xcd, 0x2c, 0x67, 0x74, 0xf1, 0xe6, 0xa8, 0xd7, 0xe0, 126 0x1e, 0xf8, 0x43, 0xaf, 0x14, 0x6c, 0x85, 0x7a, 0x6b, 0x28, 0xff, 0x5f, 0xa8, 0xc9, 0x77, 0x13, 127 0x9c, 0x0d, 0xf0, 0x10, 0x82, 0xd3, 0x82, 0xe4, 0xb4, 0xbb, 0xe4, 0x3d, 0xbf, 0xab, 0x61, 0x00, 128 0x1e, 0x49, 0x4e, 0x62, 0x9a, 0x09, 0x9e, 0xd0, 0x2a, 0xd4, 0xb5, 0xa4, 0x61, 0xc6, 0xda, 0x94, 129 0x27, 0x33, 0xcb, 0x79, 0xe0, 0x3d, 0xfd, 0xb1, 0x9a, 0x9e, 0xa7, 0x4c, 0x67, 0x5f, 0x22, 0x1c, 130 0x8b, 0xdc, 0xe5, 0x2c, 0x72, 0x65, 0xe9, 0x0a, 0x96, 0xe0, 0x2b, 0x96, 0xf8, 0xe3, 0x3d, 0xf2, 131 0xc7, 0x5a, 0xd2, 0x77, 0x2d, 0x15, 0x9e, 0x03, 0x4b, 0x95, 0xdc, 0xb6, 0x5a, 0x1f, 0xef, 0x6e, 132 0xb3, 0x9a, 0x5a, 0xc1, 0xf5, 0xa5, 0xdf, 0xce, 0xbc, 0x4f, 0xf3, 0x5f, 0xc8, 0x98, 0x37, 0xc8, 133 0x5c, 0x34, 0xc8, 0x5c, 0x36, 0xc8, 0xfc, 0xd9, 0x20, 0xf3, 0xdb, 0x1a, 0x19, 0x8b, 0x35, 0x32, 134 0x96, 0x6b, 0x64, 0x7c, 0x7e, 0xbd, 0xe7, 0xf6, 0xf7, 0x42, 0x49, 0xb4, 0xab, 0x5d, 0x79, 0x93, 135 0x0e, 0x7f, 0x2c, 0xba, 0xd3, 0x3d, 0xd3, 0xab, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x88, 136 0x1a, 0xf3, 0x03, 0x03, 0x00, 0x00, 137 } 138 139 func (m *MigratableSession) Marshal() (dAtA []byte, err error) { 140 size := m.Size() 141 dAtA = make([]byte, size) 142 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 143 if err != nil { 144 return nil, err 145 } 146 return dAtA[:n], nil 147 } 148 149 func (m *MigratableSession) MarshalTo(dAtA []byte) (int, error) { 150 size := m.Size() 151 return m.MarshalToSizedBuffer(dAtA[:size]) 152 } 153 154 func (m *MigratableSession) MarshalToSizedBuffer(dAtA []byte) (int, error) { 155 i := len(dAtA) 156 _ = i 157 var l int 158 _ = l 159 if len(m.PreparedStatements) > 0 { 160 for iNdEx := len(m.PreparedStatements) - 1; iNdEx >= 0; iNdEx-- { 161 { 162 size, err := m.PreparedStatements[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 163 if err != nil { 164 return 0, err 165 } 166 i -= size 167 i = encodeVarintSessionMigration(dAtA, i, uint64(size)) 168 } 169 i-- 170 dAtA[i] = 0x1a 171 } 172 } 173 { 174 size, err := m.LocalOnlySessionData.MarshalToSizedBuffer(dAtA[:i]) 175 if err != nil { 176 return 0, err 177 } 178 i -= size 179 i = encodeVarintSessionMigration(dAtA, i, uint64(size)) 180 } 181 i-- 182 dAtA[i] = 0x12 183 { 184 size, err := m.SessionData.MarshalToSizedBuffer(dAtA[:i]) 185 if err != nil { 186 return 0, err 187 } 188 i -= size 189 i = encodeVarintSessionMigration(dAtA, i, uint64(size)) 190 } 191 i-- 192 dAtA[i] = 0xa 193 return len(dAtA) - i, nil 194 } 195 196 func (m *MigratableSession_PreparedStatement) Marshal() (dAtA []byte, err error) { 197 size := m.Size() 198 dAtA = make([]byte, size) 199 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 200 if err != nil { 201 return nil, err 202 } 203 return dAtA[:n], nil 204 } 205 206 func (m *MigratableSession_PreparedStatement) MarshalTo(dAtA []byte) (int, error) { 207 size := m.Size() 208 return m.MarshalToSizedBuffer(dAtA[:size]) 209 } 210 211 func (m *MigratableSession_PreparedStatement) MarshalToSizedBuffer(dAtA []byte) (int, error) { 212 i := len(dAtA) 213 _ = i 214 var l int 215 _ = l 216 if len(m.SQL) > 0 { 217 i -= len(m.SQL) 218 copy(dAtA[i:], m.SQL) 219 i = encodeVarintSessionMigration(dAtA, i, uint64(len(m.SQL))) 220 i-- 221 dAtA[i] = 0x1a 222 } 223 if len(m.PlaceholderTypeHints) > 0 { 224 dAtA4 := make([]byte, len(m.PlaceholderTypeHints)*10) 225 var j3 int 226 for _, num := range m.PlaceholderTypeHints { 227 for num >= 1<<7 { 228 dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) 229 num >>= 7 230 j3++ 231 } 232 dAtA4[j3] = uint8(num) 233 j3++ 234 } 235 i -= j3 236 copy(dAtA[i:], dAtA4[:j3]) 237 i = encodeVarintSessionMigration(dAtA, i, uint64(j3)) 238 i-- 239 dAtA[i] = 0x12 240 } 241 if len(m.Name) > 0 { 242 i -= len(m.Name) 243 copy(dAtA[i:], m.Name) 244 i = encodeVarintSessionMigration(dAtA, i, uint64(len(m.Name))) 245 i-- 246 dAtA[i] = 0xa 247 } 248 return len(dAtA) - i, nil 249 } 250 251 func encodeVarintSessionMigration(dAtA []byte, offset int, v uint64) int { 252 offset -= sovSessionMigration(v) 253 base := offset 254 for v >= 1<<7 { 255 dAtA[offset] = uint8(v&0x7f | 0x80) 256 v >>= 7 257 offset++ 258 } 259 dAtA[offset] = uint8(v) 260 return base 261 } 262 func (m *MigratableSession) Size() (n int) { 263 if m == nil { 264 return 0 265 } 266 var l int 267 _ = l 268 l = m.SessionData.Size() 269 n += 1 + l + sovSessionMigration(uint64(l)) 270 l = m.LocalOnlySessionData.Size() 271 n += 1 + l + sovSessionMigration(uint64(l)) 272 if len(m.PreparedStatements) > 0 { 273 for _, e := range m.PreparedStatements { 274 l = e.Size() 275 n += 1 + l + sovSessionMigration(uint64(l)) 276 } 277 } 278 return n 279 } 280 281 func (m *MigratableSession_PreparedStatement) Size() (n int) { 282 if m == nil { 283 return 0 284 } 285 var l int 286 _ = l 287 l = len(m.Name) 288 if l > 0 { 289 n += 1 + l + sovSessionMigration(uint64(l)) 290 } 291 if len(m.PlaceholderTypeHints) > 0 { 292 l = 0 293 for _, e := range m.PlaceholderTypeHints { 294 l += sovSessionMigration(uint64(e)) 295 } 296 n += 1 + sovSessionMigration(uint64(l)) + l 297 } 298 l = len(m.SQL) 299 if l > 0 { 300 n += 1 + l + sovSessionMigration(uint64(l)) 301 } 302 return n 303 } 304 305 func sovSessionMigration(x uint64) (n int) { 306 return (math_bits.Len64(x|1) + 6) / 7 307 } 308 func sozSessionMigration(x uint64) (n int) { 309 return sovSessionMigration(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 310 } 311 func (m *MigratableSession) Unmarshal(dAtA []byte) error { 312 l := len(dAtA) 313 iNdEx := 0 314 for iNdEx < l { 315 preIndex := iNdEx 316 var wire uint64 317 for shift := uint(0); ; shift += 7 { 318 if shift >= 64 { 319 return ErrIntOverflowSessionMigration 320 } 321 if iNdEx >= l { 322 return io.ErrUnexpectedEOF 323 } 324 b := dAtA[iNdEx] 325 iNdEx++ 326 wire |= uint64(b&0x7F) << shift 327 if b < 0x80 { 328 break 329 } 330 } 331 fieldNum := int32(wire >> 3) 332 wireType := int(wire & 0x7) 333 if wireType == 4 { 334 return fmt.Errorf("proto: MigratableSession: wiretype end group for non-group") 335 } 336 if fieldNum <= 0 { 337 return fmt.Errorf("proto: MigratableSession: illegal tag %d (wire type %d)", fieldNum, wire) 338 } 339 switch fieldNum { 340 case 1: 341 if wireType != 2 { 342 return fmt.Errorf("proto: wrong wireType = %d for field SessionData", wireType) 343 } 344 var msglen int 345 for shift := uint(0); ; shift += 7 { 346 if shift >= 64 { 347 return ErrIntOverflowSessionMigration 348 } 349 if iNdEx >= l { 350 return io.ErrUnexpectedEOF 351 } 352 b := dAtA[iNdEx] 353 iNdEx++ 354 msglen |= int(b&0x7F) << shift 355 if b < 0x80 { 356 break 357 } 358 } 359 if msglen < 0 { 360 return ErrInvalidLengthSessionMigration 361 } 362 postIndex := iNdEx + msglen 363 if postIndex < 0 { 364 return ErrInvalidLengthSessionMigration 365 } 366 if postIndex > l { 367 return io.ErrUnexpectedEOF 368 } 369 if err := m.SessionData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 370 return err 371 } 372 iNdEx = postIndex 373 case 2: 374 if wireType != 2 { 375 return fmt.Errorf("proto: wrong wireType = %d for field LocalOnlySessionData", wireType) 376 } 377 var msglen int 378 for shift := uint(0); ; shift += 7 { 379 if shift >= 64 { 380 return ErrIntOverflowSessionMigration 381 } 382 if iNdEx >= l { 383 return io.ErrUnexpectedEOF 384 } 385 b := dAtA[iNdEx] 386 iNdEx++ 387 msglen |= int(b&0x7F) << shift 388 if b < 0x80 { 389 break 390 } 391 } 392 if msglen < 0 { 393 return ErrInvalidLengthSessionMigration 394 } 395 postIndex := iNdEx + msglen 396 if postIndex < 0 { 397 return ErrInvalidLengthSessionMigration 398 } 399 if postIndex > l { 400 return io.ErrUnexpectedEOF 401 } 402 if err := m.LocalOnlySessionData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 403 return err 404 } 405 iNdEx = postIndex 406 case 3: 407 if wireType != 2 { 408 return fmt.Errorf("proto: wrong wireType = %d for field PreparedStatements", wireType) 409 } 410 var msglen int 411 for shift := uint(0); ; shift += 7 { 412 if shift >= 64 { 413 return ErrIntOverflowSessionMigration 414 } 415 if iNdEx >= l { 416 return io.ErrUnexpectedEOF 417 } 418 b := dAtA[iNdEx] 419 iNdEx++ 420 msglen |= int(b&0x7F) << shift 421 if b < 0x80 { 422 break 423 } 424 } 425 if msglen < 0 { 426 return ErrInvalidLengthSessionMigration 427 } 428 postIndex := iNdEx + msglen 429 if postIndex < 0 { 430 return ErrInvalidLengthSessionMigration 431 } 432 if postIndex > l { 433 return io.ErrUnexpectedEOF 434 } 435 m.PreparedStatements = append(m.PreparedStatements, MigratableSession_PreparedStatement{}) 436 if err := m.PreparedStatements[len(m.PreparedStatements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 437 return err 438 } 439 iNdEx = postIndex 440 default: 441 iNdEx = preIndex 442 skippy, err := skipSessionMigration(dAtA[iNdEx:]) 443 if err != nil { 444 return err 445 } 446 if (skippy < 0) || (iNdEx+skippy) < 0 { 447 return ErrInvalidLengthSessionMigration 448 } 449 if (iNdEx + skippy) > l { 450 return io.ErrUnexpectedEOF 451 } 452 iNdEx += skippy 453 } 454 } 455 456 if iNdEx > l { 457 return io.ErrUnexpectedEOF 458 } 459 return nil 460 } 461 func (m *MigratableSession_PreparedStatement) Unmarshal(dAtA []byte) error { 462 l := len(dAtA) 463 iNdEx := 0 464 for iNdEx < l { 465 preIndex := iNdEx 466 var wire uint64 467 for shift := uint(0); ; shift += 7 { 468 if shift >= 64 { 469 return ErrIntOverflowSessionMigration 470 } 471 if iNdEx >= l { 472 return io.ErrUnexpectedEOF 473 } 474 b := dAtA[iNdEx] 475 iNdEx++ 476 wire |= uint64(b&0x7F) << shift 477 if b < 0x80 { 478 break 479 } 480 } 481 fieldNum := int32(wire >> 3) 482 wireType := int(wire & 0x7) 483 if wireType == 4 { 484 return fmt.Errorf("proto: PreparedStatement: wiretype end group for non-group") 485 } 486 if fieldNum <= 0 { 487 return fmt.Errorf("proto: PreparedStatement: illegal tag %d (wire type %d)", fieldNum, wire) 488 } 489 switch fieldNum { 490 case 1: 491 if wireType != 2 { 492 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 493 } 494 var stringLen uint64 495 for shift := uint(0); ; shift += 7 { 496 if shift >= 64 { 497 return ErrIntOverflowSessionMigration 498 } 499 if iNdEx >= l { 500 return io.ErrUnexpectedEOF 501 } 502 b := dAtA[iNdEx] 503 iNdEx++ 504 stringLen |= uint64(b&0x7F) << shift 505 if b < 0x80 { 506 break 507 } 508 } 509 intStringLen := int(stringLen) 510 if intStringLen < 0 { 511 return ErrInvalidLengthSessionMigration 512 } 513 postIndex := iNdEx + intStringLen 514 if postIndex < 0 { 515 return ErrInvalidLengthSessionMigration 516 } 517 if postIndex > l { 518 return io.ErrUnexpectedEOF 519 } 520 m.Name = string(dAtA[iNdEx:postIndex]) 521 iNdEx = postIndex 522 case 2: 523 if wireType == 0 { 524 var v github_com_lib_pq_oid.Oid 525 for shift := uint(0); ; shift += 7 { 526 if shift >= 64 { 527 return ErrIntOverflowSessionMigration 528 } 529 if iNdEx >= l { 530 return io.ErrUnexpectedEOF 531 } 532 b := dAtA[iNdEx] 533 iNdEx++ 534 v |= github_com_lib_pq_oid.Oid(b&0x7F) << shift 535 if b < 0x80 { 536 break 537 } 538 } 539 m.PlaceholderTypeHints = append(m.PlaceholderTypeHints, v) 540 } else if wireType == 2 { 541 var packedLen int 542 for shift := uint(0); ; shift += 7 { 543 if shift >= 64 { 544 return ErrIntOverflowSessionMigration 545 } 546 if iNdEx >= l { 547 return io.ErrUnexpectedEOF 548 } 549 b := dAtA[iNdEx] 550 iNdEx++ 551 packedLen |= int(b&0x7F) << shift 552 if b < 0x80 { 553 break 554 } 555 } 556 if packedLen < 0 { 557 return ErrInvalidLengthSessionMigration 558 } 559 postIndex := iNdEx + packedLen 560 if postIndex < 0 { 561 return ErrInvalidLengthSessionMigration 562 } 563 if postIndex > l { 564 return io.ErrUnexpectedEOF 565 } 566 var elementCount int 567 var count int 568 for _, integer := range dAtA[iNdEx:postIndex] { 569 if integer < 128 { 570 count++ 571 } 572 } 573 elementCount = count 574 if elementCount != 0 && len(m.PlaceholderTypeHints) == 0 { 575 m.PlaceholderTypeHints = make([]github_com_lib_pq_oid.Oid, 0, elementCount) 576 } 577 for iNdEx < postIndex { 578 var v github_com_lib_pq_oid.Oid 579 for shift := uint(0); ; shift += 7 { 580 if shift >= 64 { 581 return ErrIntOverflowSessionMigration 582 } 583 if iNdEx >= l { 584 return io.ErrUnexpectedEOF 585 } 586 b := dAtA[iNdEx] 587 iNdEx++ 588 v |= github_com_lib_pq_oid.Oid(b&0x7F) << shift 589 if b < 0x80 { 590 break 591 } 592 } 593 m.PlaceholderTypeHints = append(m.PlaceholderTypeHints, v) 594 } 595 } else { 596 return fmt.Errorf("proto: wrong wireType = %d for field PlaceholderTypeHints", wireType) 597 } 598 case 3: 599 if wireType != 2 { 600 return fmt.Errorf("proto: wrong wireType = %d for field SQL", wireType) 601 } 602 var stringLen uint64 603 for shift := uint(0); ; shift += 7 { 604 if shift >= 64 { 605 return ErrIntOverflowSessionMigration 606 } 607 if iNdEx >= l { 608 return io.ErrUnexpectedEOF 609 } 610 b := dAtA[iNdEx] 611 iNdEx++ 612 stringLen |= uint64(b&0x7F) << shift 613 if b < 0x80 { 614 break 615 } 616 } 617 intStringLen := int(stringLen) 618 if intStringLen < 0 { 619 return ErrInvalidLengthSessionMigration 620 } 621 postIndex := iNdEx + intStringLen 622 if postIndex < 0 { 623 return ErrInvalidLengthSessionMigration 624 } 625 if postIndex > l { 626 return io.ErrUnexpectedEOF 627 } 628 m.SQL = string(dAtA[iNdEx:postIndex]) 629 iNdEx = postIndex 630 default: 631 iNdEx = preIndex 632 skippy, err := skipSessionMigration(dAtA[iNdEx:]) 633 if err != nil { 634 return err 635 } 636 if (skippy < 0) || (iNdEx+skippy) < 0 { 637 return ErrInvalidLengthSessionMigration 638 } 639 if (iNdEx + skippy) > l { 640 return io.ErrUnexpectedEOF 641 } 642 iNdEx += skippy 643 } 644 } 645 646 if iNdEx > l { 647 return io.ErrUnexpectedEOF 648 } 649 return nil 650 } 651 func skipSessionMigration(dAtA []byte) (n int, err error) { 652 l := len(dAtA) 653 iNdEx := 0 654 depth := 0 655 for iNdEx < l { 656 var wire uint64 657 for shift := uint(0); ; shift += 7 { 658 if shift >= 64 { 659 return 0, ErrIntOverflowSessionMigration 660 } 661 if iNdEx >= l { 662 return 0, io.ErrUnexpectedEOF 663 } 664 b := dAtA[iNdEx] 665 iNdEx++ 666 wire |= (uint64(b) & 0x7F) << shift 667 if b < 0x80 { 668 break 669 } 670 } 671 wireType := int(wire & 0x7) 672 switch wireType { 673 case 0: 674 for shift := uint(0); ; shift += 7 { 675 if shift >= 64 { 676 return 0, ErrIntOverflowSessionMigration 677 } 678 if iNdEx >= l { 679 return 0, io.ErrUnexpectedEOF 680 } 681 iNdEx++ 682 if dAtA[iNdEx-1] < 0x80 { 683 break 684 } 685 } 686 case 1: 687 iNdEx += 8 688 case 2: 689 var length int 690 for shift := uint(0); ; shift += 7 { 691 if shift >= 64 { 692 return 0, ErrIntOverflowSessionMigration 693 } 694 if iNdEx >= l { 695 return 0, io.ErrUnexpectedEOF 696 } 697 b := dAtA[iNdEx] 698 iNdEx++ 699 length |= (int(b) & 0x7F) << shift 700 if b < 0x80 { 701 break 702 } 703 } 704 if length < 0 { 705 return 0, ErrInvalidLengthSessionMigration 706 } 707 iNdEx += length 708 case 3: 709 depth++ 710 case 4: 711 if depth == 0 { 712 return 0, ErrUnexpectedEndOfGroupSessionMigration 713 } 714 depth-- 715 case 5: 716 iNdEx += 4 717 default: 718 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 719 } 720 if iNdEx < 0 { 721 return 0, ErrInvalidLengthSessionMigration 722 } 723 if depth == 0 { 724 return iNdEx, nil 725 } 726 } 727 return 0, io.ErrUnexpectedEOF 728 } 729 730 var ( 731 ErrInvalidLengthSessionMigration = fmt.Errorf("proto: negative length found during unmarshaling") 732 ErrIntOverflowSessionMigration = fmt.Errorf("proto: integer overflow") 733 ErrUnexpectedEndOfGroupSessionMigration = fmt.Errorf("proto: unexpected end of group") 734 ) 735