docs: add node version explanation
This commit is contained in:
parent
a165043d13
commit
bb6d0ee8b2
|
@ -25,6 +25,8 @@ Support all platforms that can run Node.js.
|
||||||
|
|
||||||
| Node.js Connector Version | Major Changes | TDengine Version |
|
| Node.js Connector Version | Major Changes | TDengine Version |
|
||||||
| ------------------------- | ------------------------------------------------------------------------ | --------------------------- |
|
| ------------------------- | ------------------------------------------------------------------------ | --------------------------- |
|
||||||
|
| 3.1.4 | Modified the readme.| - |
|
||||||
|
| 3.1.3 | Upgraded the es5-ext version to address vulnerabilities in the lower version. | - |
|
||||||
| 3.1.2 | Optimized data protocol and parsing, significantly improved performance. | - |
|
| 3.1.2 | Optimized data protocol and parsing, significantly improved performance. | - |
|
||||||
| 3.1.1 | Optimized data transmission performance. | 3.3.2.0 and higher versions |
|
| 3.1.1 | Optimized data transmission performance. | 3.3.2.0 and higher versions |
|
||||||
| 3.1.0 | New release, supports WebSocket connection. | 3.2.0.0 and higher versions |
|
| 3.1.0 | New release, supports WebSocket connection. | 3.2.0.0 and higher versions |
|
||||||
|
@ -132,16 +134,20 @@ Node.js connector (`@tdengine/websocket`), which connects to a TDengine instance
|
||||||
In addition to obtaining a connection through a specified URL, you can also use WSConfig to specify parameters when establishing a connection.
|
In addition to obtaining a connection through a specified URL, you can also use WSConfig to specify parameters when establishing a connection.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
try {
|
const taos = require("@tdengine/websocket");
|
||||||
let url = 'ws://127.0.0.1:6041'
|
|
||||||
let conf = WsSql.NewConfig(url)
|
async function createConnect() {
|
||||||
conf.setUser('root')
|
try {
|
||||||
conf.setPwd('taosdata')
|
let url = 'ws://127.0.0.1:6041'
|
||||||
conf.setDb('db')
|
let conf = WsSql.NewConfig(url)
|
||||||
conf.setTimeOut(500)
|
conf.setUser('root')
|
||||||
let wsSql = await WsSql.open(conf);
|
conf.setPwd('taosdata')
|
||||||
} catch (e) {
|
conf.setDb('db')
|
||||||
console.error(e);
|
conf.setTimeOut(500)
|
||||||
|
let wsSql = await taos.sqlConnect(conf)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ Node.js 连接器源码托管在 [GitHub](https://github.com/taosdata/taos-conne
|
||||||
|
|
||||||
| Node.js 连接器 版本 | 主要变化 | TDengine 版本 |
|
| Node.js 连接器 版本 | 主要变化 | TDengine 版本 |
|
||||||
| ------------------| ----------------------| ----------------|
|
| ------------------| ----------------------| ----------------|
|
||||||
|
| 3.1.4 | 修改 readme | - |
|
||||||
|
| 3.1.3 | 升级了 es5-ext 版本,解决低版本的漏洞 | - |
|
||||||
| 3.1.2 | 对数据协议和解析进行了优化,性能得到大幅提升| - |
|
| 3.1.2 | 对数据协议和解析进行了优化,性能得到大幅提升| - |
|
||||||
| 3.1.1 | 优化了数据传输性能 | 3.3.2.0 及更高版本 |
|
| 3.1.1 | 优化了数据传输性能 | 3.3.2.0 及更高版本 |
|
||||||
| 3.1.0 | 新版本发布,支持 WebSocket 连接 | 3.2.0.0 及更高版本 |
|
| 3.1.0 | 新版本发布,支持 WebSocket 连接 | 3.2.0.0 及更高版本 |
|
||||||
|
|
Loading…
Reference in New Issue