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

Method genTSInsertTabletReq

client/session.go:1275–1292  ·  view source on GitHub ↗
(tablet *Tablet, isAligned bool, writeToTable bool)

Source from the content-addressed store, hash-verified

1273}
1274
1275func (s *Session) genTSInsertTabletReq(tablet *Tablet, isAligned bool, writeToTable bool) (*rpc.TSInsertTabletReq, error) {
1276 if values, err := tablet.getValuesBytes(); err == nil {
1277 request := &rpc.TSInsertTabletReq{
1278 SessionId: s.sessionId,
1279 PrefixPath: tablet.insertTargetName,
1280 Measurements: tablet.GetMeasurements(),
1281 Values: values,
1282 Timestamps: tablet.GetTimestampBytes(),
1283 Types: tablet.getDataTypes(),
1284 Size: int32(tablet.RowSize),
1285 IsAligned: &isAligned,
1286 WriteToTable: &writeToTable,
1287 }
1288 return request, nil
1289 } else {
1290 return nil, err
1291 }
1292}
1293
1294func (s *Session) GetSessionId() int64 {
1295 return s.sessionId

Callers 3

InsertTabletMethod · 0.95
InsertAlignedTabletMethod · 0.95

Calls 4

getValuesBytesMethod · 0.80
GetTimestampBytesMethod · 0.80
getDataTypesMethod · 0.80
GetMeasurementsMethod · 0.45

Tested by

no test coverage detected