* *special case for inserting one row of String (TEXT) value *params *deviceId: string, time series path for device *measurements: []string, sensor names *values: []string, values to be inserted, for each sensor *timestamp: int64, indicate the timestamp of the row of data *return *error: cor
(deviceId string, measurements []string, values []string, timestamp int64)
| 459 | *error: correctness of operation |
| 460 | */ |
| 461 | func (s *Session) InsertStringRecord(deviceId string, measurements []string, values []string, timestamp int64) error { |
| 462 | request := rpc.TSInsertStringRecordReq{ |
| 463 | SessionId: s.sessionId, PrefixPath: deviceId, Measurements: measurements, |
| 464 | Values: values, Timestamp: timestamp, |
| 465 | } |
| 466 | r, err := s.client.InsertStringRecord(context.Background(), &request) |
| 467 | if err != nil && r == nil { |
| 468 | if s.reconnect() { |
| 469 | request.SessionId = s.sessionId |
| 470 | r, err = s.client.InsertStringRecord(context.Background(), &request) |
| 471 | } |
| 472 | } |
| 473 | if err != nil { |
| 474 | return err |
| 475 | } |
| 476 | return VerifySuccess(r) |
| 477 | } |
| 478 | |
| 479 | func (s *Session) GetTimeZone() (string, error) { |
| 480 | resp, err := s.client.GetTimeZone(context.Background(), s.sessionId) |
nothing calls this directly
no test coverage detected