MCPcopy Create free account
hub / github.com/apache/iotdb-client-go / getIntByTsBlockColumnIndex

Method getIntByTsBlockColumnIndex

client/rpcdataset.go:405–424  ·  view source on GitHub ↗
(tsBlockColumnIndex int32)

Source from the content-addressed store, hash-verified

403}
404
405func (s *IoTDBRpcDataSet) getIntByTsBlockColumnIndex(tsBlockColumnIndex int32) (int32, error) {
406 if err := s.checkRecord(); err != nil {
407 return 0, err
408 }
409 if !s.isNull(tsBlockColumnIndex, s.tsBlockIndex) {
410 s.lastReadWasNull = false
411 dataType := s.curTsBlock.GetColumn(tsBlockColumnIndex).GetDataType()
412 if dataType == INT64 {
413 if v, err := s.curTsBlock.GetColumn(tsBlockColumnIndex).GetLong(s.tsBlockIndex); err != nil {
414 return 0, err
415 } else {
416 return int32(v), nil
417 }
418 }
419 return s.curTsBlock.GetColumn(tsBlockColumnIndex).GetInt(s.tsBlockIndex)
420 } else {
421 s.lastReadWasNull = true
422 return 0, nil
423 }
424}
425
426func (s *IoTDBRpcDataSet) getLongByIndex(columnIndex int32) (int64, error) {
427 if index, err := s.getTsBlockColumnIndexForColumnIndex(columnIndex); err != nil {

Callers 3

getIntByIndexMethod · 0.95
getIntMethod · 0.95

Calls 6

checkRecordMethod · 0.95
isNullMethod · 0.95
GetColumnMethod · 0.80
GetDataTypeMethod · 0.65
GetLongMethod · 0.65
GetIntMethod · 0.65

Tested by

no test coverage detected