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

Function main

example/table/table_session_example.go:32–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30)
31
32func main() {
33 flag.Parse()
34 config := &client.Config{
35 Host: "127.0.0.1",
36 Port: "6667",
37 UserName: "root",
38 Password: "root",
39 Database: "test_session",
40 }
41 session, err := client.NewTableSession(config, false, 0)
42 if err != nil {
43 log.Fatal(err)
44 }
45 defer session.Close()
46
47 checkError(session.ExecuteNonQueryStatement("create database test_db"))
48 checkError(session.ExecuteNonQueryStatement("use test_db"))
49 checkError(session.ExecuteNonQueryStatement("create table t1 (tag1 string tag, tag2 string tag, s1 text field, s2 text field)"))
50 insertRelationalTablet(session)
51 showTables(session)
52 query(session)
53}
54
55func getTextValueFromDataSet(dataSet *client.SessionDataSet, columnName string) string {
56 if isNull, err := dataSet.IsNull(columnName); err != nil {

Callers

nothing calls this directly

Calls 7

CloseMethod · 0.95
NewTableSessionFunction · 0.92
insertRelationalTabletFunction · 0.85
showTablesFunction · 0.85
queryFunction · 0.85
checkErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…