You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main changes are:
Removed the overloading of the equality operator to do set membership tests
and updated set generation syntax to align with the new membership test
syntax.
Also, got rid of the "[]" syntax in references and replaced with special "_"
character that is treated as a special iterator. Documented this behaviour in
the references section.
Also, fixed semantics so that document content is defined in terms of the rule
head which is in turn defined by instances of the body that evaluate to true.
E.g., instead of "p :- 7", we now write "p = 7", which is short for "p = 7 :-
true".
Copy file name to clipboardExpand all lines: docs/CONCEPTS.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,11 @@ Content-Type: text/plain
86
86
87
87
package opa.examples
88
88
89
-
violations[] = server :-
90
-
server = data.servers[]
91
-
server.protocols[] = "http"
92
-
server.ports[] = data.ports[i].id
93
-
data.ports[i].networks[] = data.networks[j].id
89
+
violations[server] :-
90
+
server = data.servers[_]
91
+
server.protocols[_] = "http"
92
+
server.ports[_] = data.ports[i].id
93
+
data.ports[i].networks[_] = data.networks[j].id
94
94
data.networks[j].public = true
95
95
```
96
96
@@ -190,7 +190,7 @@ Conceptually, there are two kinds of documents in OPA:
190
190
191
191
When defining policies, rules are written which contain expressions that reference documents. The language that rules are written in ("Opalog") lets you reference base documents and virtual documents in exactly the same way.
0 commit comments