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

Function printDevice1

example/session_pool/session_pool_example.go:618–644  ·  view source on GitHub ↗
(sds *client.SessionDataSet)

Source from the content-addressed store, hash-verified

616}
617
618func printDevice1(sds *client.SessionDataSet) {
619 for _, columnName := range sds.GetColumnNames() {
620 fmt.Printf("%s\t", columnName)
621 }
622 fmt.Println()
623
624 for next, err := sds.Next(); err == nil && next; next, err = sds.Next() {
625 timestamp, _ := sds.GetStringByIndex(1)
626 restartCount, _ := sds.GetIntByIndex(2)
627 tickCount, _ := sds.GetLongByIndex(3)
628 price, _ := sds.GetDoubleByIndex(4)
629 temperature, _ := sds.GetFloatByIndex(5)
630 description, _ := sds.GetStringByIndex(6)
631 status, _ := sds.GetBooleanByIndex(7)
632
633 whitespace := "\t\t"
634 fmt.Printf("%s\t", timestamp)
635 fmt.Printf("%v%s", restartCount, whitespace)
636 fmt.Printf("%v%s", price, whitespace)
637 fmt.Printf("%v%s", tickCount, whitespace)
638 fmt.Printf("%v%s", temperature, whitespace)
639 fmt.Printf("%v%s", description, whitespace)
640 fmt.Printf("%v%s", status, whitespace)
641
642 fmt.Println()
643 }
644}
645
646func printDataSet0(sessionDataSet *client.SessionDataSet) {
647 columns := sessionDataSet.GetColumnNames()

Callers 1

insertAlignedTabletFunction · 0.70

Calls 8

GetColumnNamesMethod · 0.80
GetStringByIndexMethod · 0.80
GetIntByIndexMethod · 0.80
GetLongByIndexMethod · 0.80
GetDoubleByIndexMethod · 0.80
GetFloatByIndexMethod · 0.80
GetBooleanByIndexMethod · 0.80
NextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…