modify node ci example
This commit is contained in:
parent
3834e1ccf6
commit
bc2863645c
|
@ -54,8 +54,6 @@ async function createDbAndTable() {
|
||||||
// ANCHOR: insertData
|
// ANCHOR: insertData
|
||||||
async function insertData() {
|
async function insertData() {
|
||||||
let wsSql = null
|
let wsSql = null
|
||||||
try {
|
|
||||||
wsSql = await createConnect();
|
|
||||||
let insertQuery = "INSERT INTO " +
|
let insertQuery = "INSERT INTO " +
|
||||||
"power.d1001 USING power.meters (location, groupId) TAGS('California.SanFrancisco', 2) " +
|
"power.d1001 USING power.meters (location, groupId) TAGS('California.SanFrancisco', 2) " +
|
||||||
"VALUES " +
|
"VALUES " +
|
||||||
|
@ -65,6 +63,9 @@ async function insertData() {
|
||||||
"power.d1002 USING power.meters TAGS('California.SanFrancisco', 3) " +
|
"power.d1002 USING power.meters TAGS('California.SanFrancisco', 3) " +
|
||||||
"VALUES " +
|
"VALUES " +
|
||||||
"(NOW + 1a, 10.30000, 218, 0.25000) ";
|
"(NOW + 1a, 10.30000, 218, 0.25000) ";
|
||||||
|
|
||||||
|
try {
|
||||||
|
wsSql = await createConnect();
|
||||||
taosResult = await wsSql.exec(insertQuery);
|
taosResult = await wsSql.exec(insertQuery);
|
||||||
console.log("Successfully inserted " + taosResult.getAffectRows() + " rows to power.meters.");
|
console.log("Successfully inserted " + taosResult.getAffectRows() + " rows to power.meters.");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue