index.mdx 7.1 KB
Newer Older
1 2
---
title: Connector
D
danielclow 已提交
3
description: This document describes the connectors that TDengine provides to interface with various programming languages.
4 5 6 7
---

TDengine provides a rich set of APIs (application development interface). To facilitate users to develop their applications quickly, TDengine supports connectors for multiple programming languages, including official connectors for C/C++, Java, Python, Go, Node.js, C#, and Rust. These connectors support connecting to TDengine clusters using both native interfaces (taosc) and REST interfaces (not supported in a few languages yet). Community developers have also contributed several unofficial connectors, such as the ADO.NET connector, the Lua connector, and the PHP connector.

D
dingbo 已提交
8
![TDengine Database image-connector](./connector.webp)
9 10 11

## Supported platforms

wafwerar's avatar
wafwerar 已提交
12
Currently, TDengine's native interface connectors can support platforms such as x64 and ARM hardware platforms and Linux/Windows/macOS development environments. The comparison matrix is as follows.
13

D
danielclow 已提交
14 15 16 17
| **CPU**        | **OS**    | **Java** | **Python** | **Go** | **Node.js** | **C#** | **Rust** | C/C++ |
| -------------- | --------- | -------- | ---------- | ------ | ----------- | ------ | -------- | ----- |
| **X86 64bit**  | **Linux** | ●        | ●          | ●      | ●           | ●      | ●        | ●     |
| **X86 64bit**  | **Win64** | ●        | ●          | ●      | ●           | ●      | ●        | ●     |
wafwerar's avatar
wafwerar 已提交
18
| **X86 64bit**  | **macOS** | ○        | ●          | ●      | ○           | ○      | ●        | ●     |
D
danielclow 已提交
19
| **ARM64**      | **Linux** | ●        | ●          | ●      | ●           | ○      | ○        | ●     |
wafwerar's avatar
wafwerar 已提交
20
| **ARM64**      | **macOS** | ○        | ●          | ●      | ○           | ○      | ●        | ●     |
21 22 23 24 25 26 27 28 29

Where ● means the official test verification passed, ○ means the unofficial test verification passed, -- means no assurance.

Using REST connection can support a broader range of operating systems as it does not rely on client drivers.

## Version support

TDengine version updates often add new features, and the connector versions in the list are the best-fit versions of the connector.

30 31 32 33 34 35 36
| **TDengine Versions**       | **Java**       | **Python**     | **Go**         | **C#**        | **Node.js**     | **Rust**        |
| --------------------------- | -------------- | -------------- | -------------- | ------------- | --------------- | --------------- |
| **3.0.0.0 and later**       | 3.0.2 +        | latest version | 3.0 branch     | 3.0.0         | 3.0.0           | current version |
| **2.4.0.14 and up **        | 2.0.38         | latest version | develop branch | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | current version |
| **2.4.0.4 - 2.4.0.13 **     | 2.0.37         | latest version | develop branch | 1.0.2 - 1.0.6 | 2.0.10 - 2.0.12 | current version |
| **2.2.x.x **                | 2.0.36         | latest version | master branch  | n/a           | 2.0.7 - 2.0.9   | current version |
| **2.0.x.x **                | 2.0.34         | latest version | master branch  | n/a           | 2.0.1 - 2.0.6   | current version |
37 38 39 40 41 42 43

## Functional Features

Comparing the connector support for TDengine functional features as follows.

### Using the native interface (taosc)

44 45 46 47 48 49 50
| **Functional Features**       | **Java**      | **Python** | **Go**        | **C#**        | **Node.js**   | **Rust**      |
| ----------------------------- | ------------- | ---------- | ------------- | ------------- | ------------- | ------------- |
| **Connection Management**     | Support       | Support    | Support       | Support       | Support       | Support       |
| **Regular Query**             | Support       | Support    | Support       | Support       | Support       | Support       |
| **Parameter Binding**         | Support       | Support    | Support       | Support       | Support       | Support       |
| **Subscription (TMQ)**        | Support       | Support    | Support       | Support       | Support       | Support       |
| **Schemaless**                | Support       | Support    | Support       | Support       | Support       | Support       |
51 52 53 54 55

:::info
The different database framework specifications for various programming languages do not mean that all C/C++ interfaces need a wrapper.
:::

D
danielclow 已提交
56
### Use HTTP Interfaces (REST or WebSocket)
57

58 59 60 61
| **Functional Features**                | **Java**      | **Python**      | **Go**        | **C#**        | **Node.js**   | **Rust**      |
| -------------------------------------- | ------------- | --------------- | ------------- | ------------- | ------------- | ------------- |
| **Connection Management**              | Support       | Support         | Support       | Support       | Support       | Support       |
| **Regular Query**                      | Support       | Support         | Support       | Support       | Support       | Support       |
D
dapan1121 已提交
62
| **Parameter Binding**                  | Supported | Not Supported   | Support       | Support       | Not Supported | Support       |
63
| **Subscription (TMQ) **                | Supported     | Support         | Support       | Not Supported | Not Supported | Support       |
D
dapan1121 已提交
64
| **Schemaless**                         | Supported | Not Supported   | Supported | Not Supported | Not Supported | Not Supported |
65
| **Bulk Pulling (based on WebSocket) ** | Support       | Support         | Support       | Support       | Support       | Support       |
66 67 68 69 70 71 72 73 74

:::warning

- Regardless of the programming language chosen for the connector, TDengine versions 2.0 and above recommend that each thread of a database application create a separate connection. Or create a connection pool based on threads to avoid interference between threads with the "USE statement" state within a connection (but the connection's query and write operations are thread-safe).

:::

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
wafwerar's avatar
wafwerar 已提交
75 76 77
import InstallOnLinux from "./_linux_install.mdx";
import InstallOnWindows from "./_windows_install.mdx";
import InstallOnMacOS from "./_macos_install.mdx";
78 79
import VerifyWindows from "./_verify_windows.mdx";
import VerifyLinux from "./_verify_linux.mdx";
wafwerar's avatar
wafwerar 已提交
80
import VerifyMacOS from "./_verify_macos.mdx";
81 82 83 84 85 86 87 88

## Install Client Driver

:::info
The client driver needs to be installed if you use the native interface connector on a system that does not have the TDengine server software installed.

:::

D
danielclow 已提交
89
### Install
90 91 92

<Tabs defaultValue="linux" groupId="os">
  <TabItem value="linux" label="Linux">
wafwerar's avatar
wafwerar 已提交
93
    <InstallOnLinux />
94 95
  </TabItem>
  <TabItem value="windows" label="Windows">
wafwerar's avatar
wafwerar 已提交
96 97 98 99
    <InstallOnWindows />
  </TabItem>
  <TabItem value="macos" label="MacOS">
    <InstallOnMacOS />
100 101 102
  </TabItem>
</Tabs>

D
danielclow 已提交
103
### Verify
104 105 106 107 108 109 110 111 112 113

After completing the above installation and configuration and you have confirmed that the TDengine service is up and running, you can execute the TDengine CLI tool to log in.

<Tabs defaultValue="linux" groupId="os">
  <TabItem value="linux" label="Linux">
    <VerifyLinux />
  </TabItem>
  <TabItem value="windows" label="Windows">
    <VerifyWindows />
  </TabItem>
wafwerar's avatar
wafwerar 已提交
114 115 116
  <TabItem value="macos" label="MacOS">
    <VerifyMacOS />
  </TabItem>
117 118
</Tabs>