Skip to content

"Found no way to assign variables" #208

Answered by EvgSkv
rvalek asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rvalek ,
yes, this works as intended and your solution is optimal.
We do need to document this better. For now I have added a brief section into the tutorial.

Logica tries to have a simple compiler, so user can easily control the SQL query and thus optimize their program.

So any predicate must be injectible or concrete.
Predicate is injectible if it is defined with a single non-aggregating rule. Such predicate is allowed to use aggregating expressions. This is exactly how you defined AllMatching predicate in your fix.
Injectable predicates can be "injected" into predicates that call them via substitution.

Concrete predicate can be compiled into SQL itself.

The way AllMatching is defin…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rvalek
Comment options

Answer selected by rvalek
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants