未验证 提交 4a87a58c 编写于 作者: X xiaolei li 提交者: GitHub

docs(node):fix node-rest example failed (#19797)

上级 a1b402d1
......@@ -3,18 +3,14 @@ const { options, connect } = require("@tdengine/rest");
async function test() {
options.path = "/rest/sql";
options.host = "localhost";
options.port = 6041;
let conn = connect(options);
let cursor = conn.cursor();
try {
let res = await cursor.query("SELECT server_version()");
res.toString();
console.log("res.getResult()",res.getResult());
} catch (err) {
console.log(err);
}
}
test();
// output:
// server_version() |
// ===================
// 3.0.0.0 |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册