()
| 30 | ) |
| 31 | |
| 32 | func 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 | |
| 55 | func getTextValueFromDataSet(dataSet *client.SessionDataSet, columnName string) string { |
| 56 | if isNull, err := dataSet.IsNull(columnName); err != nil { |
nothing calls this directly
no test coverage detected
searching dependent graphs…