* *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,
)
| 876 | * |
| 877 | */ |
| 878 | func (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 | |
| 899 | func (s *Session) InsertAlignedRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{}, |
| 900 | timestamps []int64, |
nothing calls this directly
no test coverage detected