Skip to content
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

Boolean expressions for httpQL queries #4

Open
boulter opened this issue Jun 30, 2017 · 4 comments
Open

Boolean expressions for httpQL queries #4

boulter opened this issue Jun 30, 2017 · 4 comments

Comments

@boulter
Copy link
Contributor

boulter commented Jun 30, 2017

Currently, all httpQL conditions are ANDed together. It would be super useful to expand this the rest of the boolean expression family - OR and NOT.

We'll first need to figure out how to group and format these new expressions as a query string.

@hs-lsong

@nbelisle11
Copy link
Contributor

I've noodled on this in the past and the biggest issue I have is there's no guaranteed order on query params.

While there's no semantic support for including a request body in a GET there is some industry support for it (ElasticSearch for example)

This feels a little safer and also, certainly more human readable. Thoughts @boulter?

If we like this approach, I can try putting together a sample JSON spec that we can play with. The plumbing shouldn't be too difficult.

@boulter
Copy link
Contributor Author

boulter commented Jun 30, 2017

Yeah, it may not be possible to do using an unencoded query string. We could either encode the entire query as one parameter or allow some expressions to be more complex. For example:

http://httql.org/?foo=bar&expr1=%28foo2%3D1%7Cfoo2%3D9%29%26bar2%3D7

where expr1 decoded is (foo2=1|foo2=9)&bar2=7

@mjball
Copy link

mjball commented Jun 30, 2017

@nbelisle11
Copy link
Contributor

Womp womp, thanks for the link @mjball

Encoding individual expressions then ANDing all expressions sounds pretty good @boulter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants