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

Method InsertAlignedRecords

client/session.go:899–918  ·  view source on GitHub ↗
(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{},
	timestamps []int64,
)

Source from the content-addressed store, hash-verified

897}
898
899func (s *Session) InsertAlignedRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{},
900 timestamps []int64,
901) error {
902 request, err := s.genInsertRecordsReq(deviceIds, measurements, dataTypes, values, timestamps, true)
903 if err != nil {
904 return err
905 } else {
906 r, err := s.client.InsertRecords(context.Background(), request)
907 if err != nil && r == nil {
908 if s.reconnect() {
909 request.SessionId = s.sessionId
910 r, err = s.client.InsertRecords(context.Background(), request)
911 }
912 }
913 if err != nil {
914 return err
915 }
916 return VerifySuccess(r)
917 }
918}
919
920/*
921 * InsertTablets insert multiple tablets, tablets are independent to each other

Callers 3

insertAlignedRecordsFunction · 0.80
insertAlignedRecordsFunction · 0.80

Calls 4

genInsertRecordsReqMethod · 0.95
reconnectMethod · 0.95
VerifySuccessFunction · 0.85
InsertRecordsMethod · 0.65

Tested by 1