MCPcopy Create free account
hub / github.com/araddon/qlbridge / Unmarshal

Method Unmarshal

rel/sql.pb.go:3268–3506  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

3266 return nil
3267}
3268func (m *ResultColumnPb) Unmarshal(data []byte) error {
3269 var hasFields [1]uint64
3270 l := len(data)
3271 iNdEx := 0
3272 for iNdEx < l {
3273 preIndex := iNdEx
3274 var wire uint64
3275 for shift := uint(0); ; shift += 7 {
3276 if shift >= 64 {
3277 return ErrIntOverflowSql
3278 }
3279 if iNdEx >= l {
3280 return io.ErrUnexpectedEOF
3281 }
3282 b := data[iNdEx]
3283 iNdEx++
3284 wire |= (uint64(b) & 0x7F) << shift
3285 if b < 0x80 {
3286 break
3287 }
3288 }
3289 fieldNum := int32(wire >> 3)
3290 wireType := int(wire & 0x7)
3291 if wireType == 4 {
3292 return fmt.Errorf("proto: ResultColumnPb: wiretype end group for non-group")
3293 }
3294 if fieldNum <= 0 {
3295 return fmt.Errorf("proto: ResultColumnPb: illegal tag %d (wire type %d)", fieldNum, wire)
3296 }
3297 switch fieldNum {
3298 case 1:
3299 if wireType != 0 {
3300 return fmt.Errorf("proto: wrong wireType = %d for field Final", wireType)
3301 }
3302 var v int
3303 for shift := uint(0); ; shift += 7 {
3304 if shift >= 64 {
3305 return ErrIntOverflowSql
3306 }
3307 if iNdEx >= l {
3308 return io.ErrUnexpectedEOF
3309 }
3310 b := data[iNdEx]
3311 iNdEx++
3312 v |= (int(b) & 0x7F) << shift
3313 if b < 0x80 {
3314 break
3315 }
3316 }
3317 b := bool(v != 0)
3318 m.Final = &b
3319 case 2:
3320 if wireType != 2 {
3321 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
3322 }
3323 var stringLen uint64
3324 for shift := uint(0); ; shift += 7 {
3325 if shift >= 64 {

Callers

nothing calls this directly

Calls 3

skipSqlFunction · 0.85
ErrorfMethod · 0.80
UnmarshalMethod · 0.45

Tested by

no test coverage detected