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
package test f = 1 p { q with time.now_ns as f } q { time.now_ns() == 1 }
run with opa build -t plan -e test, we find a plan that contains only one function for q:
opa build -t plan -e test
q
{ "name": "g0.data.test.q", "params": [ 0, 1 ], "return": 2, "blocks": [ { "stmts": [ { "type": "ResetLocalStmt", "stmt": { "target": 3, "file": 0, "col": 1, "row": 9 } }, { "type": "CallStmt", "stmt": { "func": "g0.data.test.f", "args": [ { "type": "local", "value": 0 }, { "type": "local", "value": 1 } ], "result": 4, "file": 0, "col": 3, "row": 10 } }, { "type": "AssignVarStmt", "stmt": { "source": { "type": "local", "value": 4 }, "target": 5, "file": 0, "col": 3, "row": 10 } }, { "type": "MakeNumberRefStmt", "stmt": { "Index": 2, "target": 6, "file": 0, "col": 3, "row": 10 } }, { "type": "EqualStmt", "stmt": { "a": { "type": "local", "value": 5 }, "b": { "type": "local", "value": 6 }, "file": 0, "col": 3, "row": 10 } }, { "type": "AssignVarOnceStmt", "stmt": { "source": { "type": "bool", "value": true }, "target": 3, "file": 0, "col": 1, "row": 9 } } ] }, { "stmts": [ { "type": "IsDefinedStmt", "stmt": { "source": 3, "file": 0, "col": 1, "row": 9 } }, { "type": "AssignVarOnceStmt", "stmt": { "source": { "type": "local", "value": 3 }, "target": 2, "file": 0, "col": 1, "row": 9 } } ] }, { "stmts": [ { "type": "ReturnLocalStmt", "stmt": { "source": 2, "file": 0, "col": 1, "row": 9 } } ] } ], "path": [ "g0", "test", "q" ] },
where we should expect two: one with a call to f, one with the original call to time.now_ns.
f
time.now_ns
The text was updated successfully, but these errors were encountered:
fc5c475
No branches or pull requests
run with
opa build -t plan -e test
, we find a plan that contains only one function forq
:where we should expect two: one with a call to
f
, one with the original call totime.now_ns
.The text was updated successfully, but these errors were encountered: