Merge pull request #237 from StoneT2000/master
Fix issue #236 - Node connector patch update to 1.2.1
This commit is contained in:
commit
00a7f0a898
|
@ -88,15 +88,6 @@ function convertInt(data, num_of_rows, nbytes = 0, offset = 0, micro=false) {
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
function readBigInt64LE(buffer, offset = 0) {
|
|
||||||
const first = buffer[offset];
|
|
||||||
const last = buffer[offset + 7];
|
|
||||||
if (first === undefined || last === undefined)
|
|
||||||
boundsError(offset, buffer.length - 8);
|
|
||||||
|
|
||||||
const val = buffer[offset + 4] + buffer[offset + 5] * 2 ** 8 + buffer[offset + 6] * 2 ** 16 + (last << 24); // Overflow
|
|
||||||
return ((BigInt(val) << 32n) + BigInt(first + buffer[++offset] * 2 ** 8 + buffer[++offset] * 2 ** 16 + buffer[++offset] * 2 ** 24));
|
|
||||||
}
|
|
||||||
function convertBigint(data, num_of_rows, nbytes = 0, offset = 0, micro=false) {
|
function convertBigint(data, num_of_rows, nbytes = 0, offset = 0, micro=false) {
|
||||||
data = ref.reinterpret(data.deref(), nbytes * num_of_rows, offset);
|
data = ref.reinterpret(data.deref(), nbytes * num_of_rows, offset);
|
||||||
let res = [];
|
let res = [];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "td-connector",
|
"name": "td-connector",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "td-connector",
|
"name": "td-connector",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"description": "A Node.js connector for TDengine.",
|
"description": "A Node.js connector for TDengine.",
|
||||||
"main": "tdengine.js",
|
"main": "tdengine.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -135,8 +135,8 @@ Async queries can be performed using the same functions such as `cursor.execute`
|
||||||
Say you want to execute an two async query on two seperate tables, using `cursor.query_a`, you can do that and get a TaosQuery object, which upon executing with the `execute_a` function, returns a promise that resolves with a TaosResult object.
|
Say you want to execute an two async query on two seperate tables, using `cursor.query_a`, you can do that and get a TaosQuery object, which upon executing with the `execute_a` function, returns a promise that resolves with a TaosResult object.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var promise1 = cursor.query_a('select count(*), avg(v1), avg(v2) from meter1;').execute_a()
|
var promise1 = cursor.query('select count(*), avg(v1), avg(v2) from meter1;').execute_a()
|
||||||
var promise2 = cursor.query_a('select count(*), avg(v1), avg(v2) from meter2;').execute_a();
|
var promise2 = cursor.query('select count(*), avg(v1), avg(v2) from meter2;').execute_a();
|
||||||
promise1.then(function(result) {
|
promise1.then(function(result) {
|
||||||
result.pretty();
|
result.pretty();
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue