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

Function insertRecordsOfOneDevice

example/session_example.go:400–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

398}
399
400func insertRecordsOfOneDevice() {
401 ts := time.Now().UTC().UnixNano() / 1000000
402 var (
403 deviceId = "root.sg1.dev0"
404 measurementsSlice = [][]string{
405 {"restart_count", "tick_count", "price"},
406 {"temperature", "description", "status"},
407 }
408 dataTypes = [][]client.TSDataType{
409 {client.INT32, client.INT64, client.DOUBLE},
410 {client.FLOAT, client.TEXT, client.BOOLEAN},
411 }
412 values = [][]interface{}{
413 {int32(1), int64(2018), float64(1988.1)},
414 {float32(12.1), "Test Device 1", false},
415 }
416 timestamps = []int64{ts, ts - 1}
417 )
418 checkError(session.InsertRecordsOfOneDevice(deviceId, timestamps, measurementsSlice, dataTypes, values, false))
419}
420
421func insertAlignedRecordsOfOneDevice() {
422 ts := time.Now().UTC().UnixNano() / 1000000

Callers 1

mainFunction · 0.70

Calls 2

checkErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…