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

JEP 9 - Boolean expressions #16

Merged
merged 4 commits into from
Sep 30, 2015
Merged

JEP 9 - Boolean expressions #16

merged 4 commits into from
Sep 30, 2015

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Sep 22, 2015

This jep adds improved boolean expressions and filters to JMESPath.

High level summary is it adds:

  • And expression: a && b
  • Not expressions: !is_admin
  • Parens: (a || b) && c

In addition to top level expressions, you can also use them in filter expressions: Users[? is_admin && !new_account]

Will link jmespath.test updates and JEP 9 implementations to the tracking PR.

jamesls added a commit to jmespath/jmespath.test that referenced this pull request Sep 23, 2015
jamesls added a commit to jmespath/jmespath.test that referenced this pull request Sep 23, 2015
@jamesls
Copy link
Member Author

jamesls commented Sep 29, 2015

Last call for feedback. I think as far changes go, this is a pretty straightforward change that fleshes out the partial boolean support that JMESPath previously had.

If you want something more concrete to look at, here at the proposed compliance tests for this change: jmespath/jmespath.test@f8f678e

Note: I'll update the compliance tests to not use the outdated syntax of:

`foo`


The operator precedence list in the specification will now read:

* Pipe - ``||``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be |

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@mtdowling
Copy link
Contributor

Nice work. :shipit:

@jamesls jamesls merged commit d6fb385 into master Sep 30, 2015
@jamesls
Copy link
Member Author

jamesls commented Sep 30, 2015

Ok, I'll mark this as accepted and merge.

jamesls added a commit to jmespath/jmespath.test that referenced this pull request Sep 30, 2015
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

Successfully merging this pull request may close these issues.

2 participants