modify node ci example

This commit is contained in:
menshibin 2024-09-25 14:38:48 +08:00
parent 3834e1ccf6
commit bc2863645c
1 changed files with 10 additions and 9 deletions

View File

@ -54,8 +54,6 @@ async function createDbAndTable() {
// ANCHOR: insertData
async function insertData() {
let wsSql = null
try {
wsSql = await createConnect();
let insertQuery = "INSERT INTO " +
"power.d1001 USING power.meters (location, groupId) TAGS('California.SanFrancisco', 2) " +
"VALUES " +
@ -65,6 +63,9 @@ async function insertData() {
"power.d1002 USING power.meters TAGS('California.SanFrancisco', 3) " +
"VALUES " +
"(NOW + 1a, 10.30000, 218, 0.25000) ";
try {
wsSql = await createConnect();
taosResult = await wsSql.exec(insertQuery);
console.log("Successfully inserted " + taosResult.getAffectRows() + " rows to power.meters.");
} catch (err) {