MCPcopy Create free account
hub / github.com/apache/fory / readValues

Method readValues

go/fory/slice_primitive_list.go:318–347  ·  view source on GitHub ↗
(buf *ByteBuffer, err *Error, value reflect.Value, length int, hasNull bool)

Source from the content-addressed store, hash-verified

316}
317
318func (s primitiveListSerializer) readValues(buf *ByteBuffer, err *Error, value reflect.Value, length int, hasNull bool) {
319 switch s.type_.Elem().Kind() {
320 case reflect.Bool:
321 *(*[]bool)(value.Addr().UnsafePointer()) = readBoolListValues(buf, err, length, hasNull)
322 case reflect.Int8:
323 *(*[]int8)(value.Addr().UnsafePointer()) = readInt8ListValues(buf, err, length, hasNull)
324 case reflect.Uint8:
325 *(*[]byte)(value.Addr().UnsafePointer()) = readUint8ListValues(buf, err, length, hasNull)
326 case reflect.Int16:
327 *(*[]int16)(value.Addr().UnsafePointer()) = readInt16ListValues(buf, err, length, hasNull)
328 case reflect.Uint16:
329 *(*[]uint16)(value.Addr().UnsafePointer()) = readUint16ListValues(buf, err, length, hasNull)
330 case reflect.Int32:
331 *(*[]int32)(value.Addr().UnsafePointer()) = readInt32ListValues(buf, err, length, hasNull, s.elemTypeID)
332 case reflect.Uint32:
333 *(*[]uint32)(value.Addr().UnsafePointer()) = readUint32ListValues(buf, err, length, hasNull, s.elemTypeID)
334 case reflect.Int64:
335 *(*[]int64)(value.Addr().UnsafePointer()) = readInt64ListValues(buf, err, length, hasNull, s.elemTypeID)
336 case reflect.Uint64:
337 *(*[]uint64)(value.Addr().UnsafePointer()) = readUint64ListValues(buf, err, length, hasNull, s.elemTypeID)
338 case reflect.Int:
339 *(*[]int)(value.Addr().UnsafePointer()) = readIntListValues(buf, err, length, hasNull, s.elemTypeID)
340 case reflect.Uint:
341 *(*[]uint)(value.Addr().UnsafePointer()) = readUintListValues(buf, err, length, hasNull, s.elemTypeID)
342 case reflect.Float32:
343 *(*[]float32)(value.Addr().UnsafePointer()) = readFloat32ListValues(buf, err, length, hasNull)
344 case reflect.Float64:
345 *(*[]float64)(value.Addr().UnsafePointer()) = readFloat64ListValues(buf, err, length, hasNull)
346 }
347}
348
349func (s primitiveListSerializer) readArrayValues(buf *ByteBuffer, err *Error, value reflect.Value, length int) {
350 switch s.type_.Elem().Kind() {

Callers 2

ReadDataMethod · 0.95
ReadDataMethod · 0.80

Calls 14

readBoolListValuesFunction · 0.85
readInt8ListValuesFunction · 0.85
readUint8ListValuesFunction · 0.85
readInt16ListValuesFunction · 0.85
readUint16ListValuesFunction · 0.85
readInt32ListValuesFunction · 0.85
readUint32ListValuesFunction · 0.85
readInt64ListValuesFunction · 0.85
readUint64ListValuesFunction · 0.85
readIntListValuesFunction · 0.85
readUintListValuesFunction · 0.85
readFloat32ListValuesFunction · 0.85

Tested by

no test coverage detected