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

Add a "Query Builder" function that uses SegmentRules #15

Open
moshthepitt opened this issue May 10, 2018 · 0 comments
Open

Add a "Query Builder" function that uses SegmentRules #15

moshthepitt opened this issue May 10, 2018 · 0 comments
Labels
discussion needs discussion

Comments

@moshthepitt
Copy link
Contributor

Add a way to build a query that filters using SegmentRules.

A SegmentRule is essentially a rule that defines how to filter a certain model. What we need is add a function or other way to use SegmentRule objects to query and filter as desired.

For example you might have these segment rules:

rule1:
  - target_type: location
  - target_field: id
  - target_value: 5

rule2:
  - target_type: task
  - target_field: status
  - target_value: active

The above could then be used to build a query that filters for tasks where the location is id 5 and the status is active.

@moshthepitt moshthepitt added the discussion needs discussion label May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needs discussion
Projects
None yet
Development

No branches or pull requests

1 participant