(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId)
| 774 | } |
| 775 | |
| 776 | func readUint64ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId) []uint64 { |
| 777 | result := make([]uint64, length) |
| 778 | if !hasNull && typeID == UINT64 { |
| 779 | size := length * 8 |
| 780 | if isLittleEndian { |
| 781 | buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), size)) |
| 782 | } else { |
| 783 | for i := 0; i < length; i++ { |
| 784 | result[i] = uint64(buf.ReadInt64(err)) |
| 785 | } |
| 786 | } |
| 787 | return result |
| 788 | } |
| 789 | for i := 0; i < length; i++ { |
| 790 | if hasNull && buf.ReadInt8(err) == NullFlag { |
| 791 | continue |
| 792 | } |
| 793 | switch typeID { |
| 794 | case UINT64: |
| 795 | result[i] = uint64(buf.ReadInt64(err)) |
| 796 | case TAGGED_UINT64: |
| 797 | result[i] = buf.ReadTaggedUint64(err) |
| 798 | default: |
| 799 | result[i] = buf.ReadVarUint64(err) |
| 800 | } |
| 801 | } |
| 802 | return result |
| 803 | } |
| 804 | |
| 805 | func writeIntListValues(buf *ByteBuffer, value []int, typeID TypeId) { |
| 806 | if reflect.TypeOf(int(0)).Size() == 8 { |
no test coverage detected