Did you know ... | Search Documentation: |
CQL: Getting Started Quickly |
Here is a simple example of a SQL SELECT from the table se_lt_x
test(A) :- format('About to call CQL with A=~w', [A]), {[], se_lt_x :: [a-A, b-B, c-C]}, format('B=~w, C=~w', [B, C]).
Comparisons can be done in-line e.g.
[a-'ELSTON_M']
or with the ==
operator e.g.
[a-A], A == 'ELSTON_M'.
The single = operator means unify, not compare. Use = for unification, not comparison
FIXME: Unification is deprecated.
The operators =:=
and \==
are also
available for numerical value comparisons (they just translate to SQL =
and <>
, so in fact you could use them for string
comparisons)