_connect_go.mdx 540 字节
Newer Older
G
gccgdb1234 已提交
1 2
#### Unified Database Access Interface
```go title="Native Connection"
D
dingbo 已提交
3 4
{{#include docs-examples/go/connect/cgoexample/main.go}}
```
G
gccgdb1234 已提交
5
```go title="REST Connection"
D
dingbo 已提交
6 7
{{#include docs-examples/go/connect/restexample/main.go}}
```
G
gccgdb1234 已提交
8 9
#### 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.
D
dingbo 已提交
10

G
gccgdb1234 已提交
11
```go title="Establish native connection using af package"
D
dingbo 已提交
12 13 14 15
{{#include docs-examples/go/connect/afconn/main.go}}
```