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

Function printDevice1

example/session_example.go:164–190  ·  view source on GitHub ↗
(sds *client.SessionDataSet)

Source from the content-addressed store, hash-verified

162}
163
164func printDevice1(sds *client.SessionDataSet) {
165 for _, columnName := range sds.GetColumnNames() {
166 fmt.Printf("%s\t", columnName)
167 }
168 fmt.Println()
169
170 for next, err := sds.Next(); err == nil && next; next, err = sds.Next() {
171 timestamp, _ := sds.GetStringByIndex(1)
172 restartCount, _ := sds.GetIntByIndex(2)
173 tickCount, _ := sds.GetLongByIndex(3)
174 price, _ := sds.GetDoubleByIndex(4)
175 temperature, _ := sds.GetFloatByIndex(5)
176 description, _ := sds.GetStringByIndex(6)
177 status, _ := sds.GetBooleanByIndex(7)
178
179 whitespace := "\t\t"
180 fmt.Printf("%s\t", timestamp)
181 fmt.Printf("%v%s", restartCount, whitespace)
182 fmt.Printf("%v%s", price, whitespace)
183 fmt.Printf("%v%s", tickCount, whitespace)
184 fmt.Printf("%v%s", temperature, whitespace)
185 fmt.Printf("%v%s", description, whitespace)
186 fmt.Printf("%v%s", status, whitespace)
187
188 fmt.Println()
189 }
190}
191
192func printDataSet0(sessionDataSet *client.SessionDataSet) {
193 columns := sessionDataSet.GetColumnNames()

Callers 2

mainFunction · 0.70
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…