We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
p.rego:
p.rego
package filters import rego.v1 include if cheap(input.fruits) default cheap(_) := true cheap(f) if f.price < 100
Eval with a fruit that has no price:
$ echo '{"fruits": {"name": "banana"}}' | opa eval -fpretty -I -d p.rego data.filters.include true
Partial eval:
$ opa eval -fpretty -p -d p.rego data.filters.include +---------+--------------------------+ | Query 1 | input.fruits.price < 100 | +---------+--------------------------+
With the PE resuit, a fruit without a price would be denied. It shouldn't be. The default function value seems to be disregarded.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
p.rego
:Eval with a fruit that has no price:
Partial eval:
With the PE resuit, a fruit without a price would be denied. It shouldn't be. The default function value seems to be disregarded.
The text was updated successfully, but these errors were encountered: