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

Ability to evaluate rules directly instead of evaluating queries #185

Closed
anakrish opened this issue Mar 25, 2024 · 0 comments · Fixed by #186
Closed

Ability to evaluate rules directly instead of evaluating queries #185

anakrish opened this issue Mar 25, 2024 · 0 comments · Fixed by #186
Labels
enhancement New feature or request feature perf Performance of regorus

Comments

@anakrish
Copy link
Collaborator

anakrish commented Mar 25, 2024

OPA queries are similar to rule bodies or comprehension bodies. They can contain multiple rego expressions, multiple statements, and even loops. The QueryResults structure returned by evaluating the queries is also verbose - the value produced by each statement is captured along with the location information.

In many cases, such detail is not needed. All that is needed is the ability to execute a given rule and return the output.
Such an API would be faster than eval_query.

Here is another use case: #36 (comment) that favors evaluating rules directly instead of a query.

@anakrish anakrish added enhancement New feature or request feature perf Performance of regorus labels Mar 25, 2024
anakrish added a commit that referenced this issue Mar 25, 2024
closes #185

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature perf Performance of regorus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant