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

Method InsertAlignedRecord

client/session.go:726–744  ·  view source on GitHub ↗
(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64)

Source from the content-addressed store, hash-verified

724}
725
726func (s *Session) InsertAlignedRecord(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64) error {
727 request, err := s.genTSInsertRecordReq(deviceId, timestamp, measurements, dataTypes, values, true)
728 if err != nil {
729 return err
730 }
731 r, err := s.client.InsertRecord(context.Background(), request)
732
733 if err != nil && r == nil {
734 if s.reconnect() {
735 request.SessionId = s.sessionId
736 r, err = s.client.InsertRecord(context.Background(), request)
737 }
738 }
739
740 if err != nil {
741 return err
742 }
743 return VerifySuccess(r)
744}
745
746type deviceData struct {
747 timestamps []int64

Callers 3

insertAlignedRecordFunction · 0.80
insertAlignedRecordFunction · 0.80

Calls 4

genTSInsertRecordReqMethod · 0.95
reconnectMethod · 0.95
VerifySuccessFunction · 0.85
InsertRecordMethod · 0.65

Tested by 1