mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
0e29f3a8730759548eab60895e913977c4ef377d
Previously, the REPL treated all bodies as queries: the query was evaluated and for each instance where the query was true, the variable bindings were displayed. If there were no variables in the body, "true" was printed. If there were no instances where the query was true, "false" was printed. Now, the REPL treats single term expressions as a special case under the assumption that the user wants to see the value of the term. In cases where the term can only evaluate to a single value (e.g., it's ground), the value of the term is serialized to JSON and printed. This is useful for initially learning the language and eventually experimenting with references, e.g.: > data.servers[0].name "web" > In cases where the term can evaluate to multiple values (i.e., it's non-ground), the REPL displays one row of output for each instance where the query is true. Each row contains the bindings of non-wildcard variables as well as a column for the value of the term itself. This is useful for quickly evaluating references without defining an intermediate variable, e.g.: > data.servers[x].name 0,"web" 1,"app" ... >
OPA: Open Policy Agent
The Open Policy Agent (OPA) is an open source project that helps policy enable your application. By integrating with OPA, your application's operators will be empowered to manage the size, complexity, and scale of modern deployments.
To learn more and get started, visit openpolicyagent.org.
Helpful Links
- License: Apache Version 2.0
- Bugs: Github Issues
- Features: Github Issues
- Discussions: Google Groups
- Continuous Integration:
Description
Languages
Go
85.1%
C
7.5%
C++
5.6%
Open Policy Agent
0.8%
Open-Policy-Agent
0.4%
Other
0.5%