in example/session_example.go [253:280]
func printDataSet2(sds *client.SessionDataSet) {
showTimestamp := !sds.IsIgnoreTimeStamp()
if showTimestamp {
fmt.Print("Time\t\t\t\t")
}
for i := 0; i < sds.GetColumnCount(); i++ {
fmt.Printf("%s\t", sds.GetColumnName(i))
}
fmt.Println()
for next, err := sds.Next(); err == nil && next; next, err = sds.Next() {
if showTimestamp {
fmt.Printf("%s\t", sds.GetText(client.TimestampColumnName))
}
if record, err := sds.GetRowRecord(); err == nil {
for _, field := range record.GetFields() {
v := field.GetValue()
if field.IsNull() {
v = "null"
}
fmt.Printf("%v\t\t", v)
}
fmt.Println()
}
}
}