-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"or" operator for condition #2
Comments
In the previous version, you can use as follows: const QL = require("influx-ql");
const ql = new QL();
ql.measurement = 'stats';
ql.addField('one', 'two', 'three');
ql.start = '1463142660s';
ql.end = '1463142720s';
ql.addCondition("myCond='40002' or myCond='40007'");
console.info(ql.toSelect()); Now I have updated a new version to enhance the const QL = require("influx-ql");
const ql = new QL();
ql.measurement = 'stats';
ql.addField('one', 'two', 'three');
ql.start = '1463142660s';
ql.end = '1463142720s';
ql.condition("myCond='40002' or myCond='40007'");
console.info(ql.toSelect()); |
Thanks! Would it be an idea to support conditions as key-value pairs where they value can be an array in a case like i have above? -----Original Message----- In the previous version, you can use as follows: |
Now I have updated a new version, , you can use as follows: const QL = require("influx-ql");
const ql = new QL();
ql.measurement = 'stats';
ql.addField('one', 'two', 'three');
ql.start = '1463142660s';
ql.end = '1463142720s';
ql.condition('myCond', ['40002', '40007']);
console.info(ql.toSelect()); |
Great, thanks! :-) Will try it out. -----Original Message----- Now I have updated a new version, , you can use as follows: |
Trying to query
select one,two,three from stats where myCond='40002' or myCond='40007' and time <= 1463142720s and time >= 1463142660s
Tried with
In this case the condition is ignored. If I only enter one condition without "or" operator it is considered and included in the query.
How can I add several conditions on the same field as one would do with "or" operator?
The text was updated successfully, but these errors were encountered: