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

Function showTables

example/table/table_session_example.go:119–140  ·  view source on GitHub ↗
(session client.ITableSession)

Source from the content-addressed store, hash-verified

117}
118
119func showTables(session client.ITableSession) {
120 timeout := int64(2000)
121 dataSet, err := session.ExecuteQueryStatement("show tables", &timeout)
122 defer dataSet.Close()
123 if err != nil {
124 log.Fatal(err)
125 }
126 for {
127 hasNext, err := dataSet.Next()
128 if err != nil {
129 log.Fatal(err)
130 }
131 if !hasNext {
132 break
133 }
134 value, err := dataSet.GetString("TableName")
135 if err != nil {
136 log.Fatal(err)
137 }
138 log.Printf("tableName is %v", value)
139 }
140}
141
142func query(session client.ITableSession) {
143 timeout := int64(2000)

Callers 1

mainFunction · 0.85

Calls 4

GetStringMethod · 0.80
ExecuteQueryStatementMethod · 0.65
CloseMethod · 0.65
NextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…