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

Make predicate syntax more concise #4

Closed
fxnn opened this issue Apr 10, 2015 · 0 comments
Closed

Make predicate syntax more concise #4

fxnn opened this issue Apr 10, 2015 · 0 comments
Assignees
Milestone

Comments

@fxnn
Copy link
Owner

fxnn commented Apr 10, 2015

Currently, predicates work like

where: {
  allof: [{
    field: Message,
    contains: some text
  }, {
    field: Message,
    matches: '%{SOME_PATTERN}'
  }]
}

This could be made a lot more concise by removing the "field" key and mapping fields to conditions instead:

where: {
  Message: {contains: some text, matches: '%{SOME_PATTERN}'},
  not: {Message: {matches: '%{ANOTHER_PATTERN}'}}
}

This of course is at the expense of prohibiting the custom fields not, allof, anyof. Guess we can live with that.

@fxnn fxnn changed the title Improve predicate syntax Make predicate syntax more concise Apr 10, 2015
@fxnn fxnn modified the milestone: 1.0.0.M1 Apr 11, 2015
@fxnn fxnn self-assigned this Apr 11, 2015
fxnn added a commit that referenced this issue Apr 11, 2015
fxnn added a commit that referenced this issue Apr 11, 2015
@fxnn fxnn closed this as completed Apr 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant