(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId)
| 614 | } |
| 615 | |
| 616 | func readInt32ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId) []int32 { |
| 617 | result := make([]int32, length) |
| 618 | if !hasNull && typeID == INT32 { |
| 619 | size := length * 4 |
| 620 | if isLittleEndian { |
| 621 | buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), size)) |
| 622 | } else { |
| 623 | for i := 0; i < length; i++ { |
| 624 | result[i] = buf.ReadInt32(err) |
| 625 | } |
| 626 | } |
| 627 | return result |
| 628 | } |
| 629 | for i := 0; i < length; i++ { |
| 630 | if hasNull && buf.ReadInt8(err) == NullFlag { |
| 631 | continue |
| 632 | } |
| 633 | if typeID == INT32 { |
| 634 | result[i] = buf.ReadInt32(err) |
| 635 | } else { |
| 636 | result[i] = buf.ReadVarint32(err) |
| 637 | } |
| 638 | } |
| 639 | return result |
| 640 | } |
| 641 | |
| 642 | func writeUint32ListValues(buf *ByteBuffer, value []uint32, typeID TypeId) { |
| 643 | if typeID == UINT32 { |
no test coverage detected