_connect_go.mdx 542 字节
Newer Older
G
gccgdb1234 已提交
1
#### Unified Database Access Interface
D
dingbo 已提交
2

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

G
gccgdb1234 已提交
7
```go title="REST Connection"
D
dingbo 已提交
8 9
{{#include docs-examples/go/connect/restexample/main.go}}
```
D
dingbo 已提交
10

G
gccgdb1234 已提交
11
#### Advanced Features
D
dingbo 已提交
12

G
gccgdb1234 已提交
13
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 已提交
14

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