-
Notifications
You must be signed in to change notification settings - Fork 115
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
Unbound variable in defquery #470
Comments
@vganshin, |
@EthanEChristian the latest one. 0.21.1 |
Slipped my mind, but the failure above is due to the parameter not being used as a "binding". Clara's queries assume that the "parameter" should be used as one would use a binding. So something like,
instead of:
The reason for this behavior comes down to how Clara "executes" queries, or rather doesn't execute queries. When a session is queried, rather than running logic for a query, instead Clara is simply asking "memory":
To support the pattern above, Clara would have to somehow maintain all constraints with references to parameters and then upon request, apply the constraints after the initial facts were returned from memory. |
Hello. Could you assist on an exception I got while playing with clara-rules?
I'm trying to make a simple rule that calculates patient's age and a query which retrieve patients older than certain age. When I run
(mk-session 'clara.example)
I get an exception which says I have Unbound variables: #{?age} in my query. I don't understand, why is it unbound if it's passed as a parameter.The text was updated successfully, but these errors were encountered: