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

Function insertAlignedRecords

example/session_example.go:381–398  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

379}
380
381func insertAlignedRecords() {
382 var (
383 deviceIds = []string{"root.al1.dev2", "root.al1.dev3"}
384 measurements = [][]string{{"status"}, {"temperature"}}
385 dataTypes = [][]client.TSDataType{{client.TEXT}, {client.TEXT}}
386 values = [][]interface{}{{"33"}, {"44"}}
387 timestamps = []int64{12, 13}
388 )
389 checkError(session.InsertAlignedRecords(deviceIds, measurements, dataTypes, values, timestamps))
390 sessionDataSet, err := session.ExecuteStatement("show devices")
391 if err == nil {
392 printDataSet0(sessionDataSet)
393 sessionDataSet.Close()
394 } else {
395 log.Println(err)
396 }
397 fmt.Println()
398}
399
400func insertRecordsOfOneDevice() {
401 ts := time.Now().UTC().UnixNano() / 1000000

Callers 1

mainFunction · 0.70

Calls 5

InsertAlignedRecordsMethod · 0.80
checkErrorFunction · 0.70
printDataSet0Function · 0.70
ExecuteStatementMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…