_connect_go.mdx 542 字节
Newer Older
1 2 3
#### Unified Database Access Interface

```go title="Native Connection"
D
dingbo 已提交
4
{{#include docs/examples/go/connect/cgoexample/main.go}}
5 6 7
```

```go title="REST Connection"
D
dingbo 已提交
8
{{#include docs/examples/go/connect/restexample/main.go}}
9 10 11 12 13 14 15
```

#### Advanced Features

The af package of driver-go can also be used to establish connection, with this way some advanced features of TDengine, like parameter binding and subscription, can be used.

```go title="Establish native connection using af package"
D
dingbo 已提交
16
{{#include docs/examples/go/connect/afconn/main.go}}
17
```