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

Function printDataSet1

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

Source from the content-addressed store, hash-verified

227}
228
229func printDataSet1(sds *client.SessionDataSet) {
230 columnNames := sds.GetColumnNames()
231 for _, value := range columnNames {
232 fmt.Printf("%s\t", value)
233 }
234 fmt.Println()
235
236 for next, err := sds.Next(); err == nil && next; next, err = sds.Next() {
237 for _, columnName := range columnNames {
238 isNull, _ := sds.IsNull(columnName)
239
240 if isNull {
241 fmt.Printf("%v\t\t", "null")
242 } else {
243 v, _ := sds.GetString(columnName)
244 fmt.Printf("%v\t\t", v)
245 }
246 }
247 fmt.Println()
248 }
249}
250
251func printDataSet2(sds *client.SessionDataSet) {
252 columnNames := sds.GetColumnNames()

Calls 4

GetColumnNamesMethod · 0.80
GetStringMethod · 0.80
IsNullMethod · 0.65
NextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…