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

Function insertAlignedRecord

example/session_pool/session_pool_example.go:262–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

260}
261
262func insertAlignedRecord() {
263 var (
264 deviceId = "root.al1.dev1"
265 measurements = []string{"status"}
266 values = []interface{}{"123"}
267 dataTypes = []client.TSDataType{client.TEXT}
268 timestamp int64 = 12
269 )
270 session, err := sessionPool.GetSession()
271 defer sessionPool.PutBack(session)
272 if err == nil {
273 checkError(session.InsertAlignedRecord(deviceId, measurements, dataTypes, values, timestamp))
274 sessionDataSet, err := session.ExecuteStatement("show devices")
275 if err == nil {
276 printDataSet0(sessionDataSet)
277 sessionDataSet.Close()
278 } else {
279 log.Println(err)
280 }
281 fmt.Println()
282 }
283
284}
285
286func insertRecords() {
287 var (

Callers 1

mainFunction · 0.70

Calls 7

PutBackMethod · 0.80
InsertAlignedRecordMethod · 0.80
checkErrorFunction · 0.70
printDataSet0Function · 0.70
ExecuteStatementMethod · 0.65
CloseMethod · 0.65
GetSessionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…