【发布时间】:2019-05-22 10:58:54
【问题描述】:
我得到一个二维数组,其中包含一个流入函数和一个应该添加到流入函数的值。
let influxFunctions = [
{key: "function1", value: "value1"},
{key: "function2", value: "value2"},
];
/*
"mean" should be function1 for example
and name should be value1 and that for each element in the array
*/
influxClient.query(`database`)
.addFunction('mean', 'name')
.addFunction('mean', 'email')
.then(console.log)
.catch(console.error);
有没有办法将这些函数添加到
influxClient.query(`database`)不提交?
使用的influx客户端是https://www.npmjs.com/package/influxdb-nodejs。
我知道有一个函数.field(fields),它可以处理一个数组但是这个函数只允许字段。
【问题讨论】:
标签: javascript node.js influxdb