-
Notifications
You must be signed in to change notification settings - Fork 40
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
Query Builder where clause should support more operators #18
Comments
The query builder definitely needs a bucket of love already! Or in a more honest wording: "a complete rewrite". (Separating blocks with some horizontal rules because long text ahead ^^) First of all the thing that is definitely possible right now: While the official documentation does not explicitely state it there seems to be no problem to use just one of them. Just passing an If you want please go ahead and send a pull request for those 👍 The Your proposal of using spaces to separate the operator from the field might be a bit unusual to wrap ones head around. It seems like quite the hack for the sake of keeping existing syntax. The whole builder thing is marked experimental so we could just break things with a warning and do it future proof as soon as possible. Future proof meaning the support of the full InfluxQL spec I am aiming at (future...). Like all the stuff I just looked up in the documentation:
That is at least the point I would like to get to at some time. But how could we get there?
Well, I probably should start working on those macros already... |
This is my PR: #19 |
As I read from the code, currently, Instream.Query.Builder where clause only supports equal operator. It should support more operators like >, <, >=, <=
One idea is for each {key, value} pair in the where conditions map, the key can be a string with format "field[space]op" whereas op is either ">", "<", ">=" nor "<=". If the key is an atom or op is omitted, we can consider the operator is equal.
For example:
Query Builder should also support LIMIT and OFFSET clauses
For example:
If you don't mind, I can create a PR for this
The text was updated successfully, but these errors were encountered: