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

Method InsertRecords

client/session.go:878–897  ·  view source on GitHub ↗

* *insert multiple rows of data, records are independent to each other, in other words, there's no relationship *between those records * *params *deviceIds: []string, time series paths for device *measurements: [][]string, each element of outer list indicates measurements of a device *dataTyp

(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{},
	timestamps []int64,
)

Source from the content-addressed store, hash-verified

876 *
877 */
878func (s *Session) InsertRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{},
879 timestamps []int64,
880) error {
881 request, err := s.genInsertRecordsReq(deviceIds, measurements, dataTypes, values, timestamps, false)
882 if err != nil {
883 return err
884 } else {
885 r, err := s.client.InsertRecords(context.Background(), request)
886 if err != nil && r == nil {
887 if s.reconnect() {
888 request.SessionId = s.sessionId
889 r, err = s.client.InsertRecords(context.Background(), request)
890 }
891 }
892 if err != nil {
893 return err
894 }
895 return VerifySuccess(r)
896 }
897}
898
899func (s *Session) InsertAlignedRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{},
900 timestamps []int64,

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected