| Did you know ... | Search Documentation: |
| CQL: Using compile_time_goal/1 |
You can include compile_time_goal(Goal) in your CQL. If
you specify a module, it will be used, otherwise the goal will be called
in the current module. Note that the goal is executed in-order - if you
want to use the bindings in your CQL, you must put the compile_time_goal
before them.
Example 1
{[],
se_lt_x :: [a-UserName,
b-RealName,
d-FavouriteColour],
compile_time_goal(standard_batch_size_for_search(StandardBatchSize)),
top(StandardBatchSize),
order_by([+UserName]}
Example 2
excellent_colours(['RED', 'BLUE']).
{[],
se_lt_x :: [a-UserName,
b-RealName,
d-FavouriteColour],
compile_time_goal(excellent_colours(Colours)),
FavouriteColour == Colours}