From b71885472716c8ea7a84e0b22afbdcf85c186b6a Mon Sep 17 00:00:00 2001 From: zyyang Date: Tue, 29 Dec 2020 17:12:17 +0800 Subject: [PATCH] change --- src/connector/nodejs/package.json | 2 +- src/connector/nodejs/test/test.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/connector/nodejs/package.json b/src/connector/nodejs/package.json index 3f0600a09c..2d5cf45e1d 100644 --- a/src/connector/nodejs/package.json +++ b/src/connector/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "td2.0-connector", - "version": "2.0.1", + "version": "2.0.4", "description": "A Node.js connector for TDengine.", "main": "tdengine.js", "scripts": { diff --git a/src/connector/nodejs/test/test.js b/src/connector/nodejs/test/test.js index 27c35bb481..bf4bb2c541 100644 --- a/src/connector/nodejs/test/test.js +++ b/src/connector/nodejs/test/test.js @@ -84,10 +84,19 @@ q.execute().then(function(r) { r.pretty(); }); + +// test query null value +c1.execute("create table if not exists td_connector_test.weather(ts timestamp, temperature float, humidity int) tags(location nchar(64))"); +c1.execute("insert into t1 using weather tags('北京') values(now, 11.11, 11)"); +c1.execute("insert into t1(ts, temperature) values(now, 22.22)"); +c1.execute("insert into t1(ts, humidity) values(now, 33)"); +c1.query('select * from test.t1', true).then(function (result) { + result.pretty(); +}); + var q = c1.query('select * from td_connector_test.weather'); console.log(q.query); q.execute().then(function(r) { - //console.log(r); r.pretty(); }); -- GitLab