public interface Term extends CqlSnippet
It is used as an argument to certain selectors (for example the indices in a range), or as the right operand of relations.
To create a term, call one of the static factory methods in QueryBuilder
:
literal()
to inline a Java object into the query
string;
function()
to invoke
a built-in or user-defined function;
add()
,
subtract()
, negate()
, multiply()
, divide()
or remainder()
;
typeHint()
to coerce another term to a
particular CQL type;
raw()
for a raw CQL snippet.
Modifier and Type | Method and Description |
---|---|
boolean |
isIdempotent()
Whether the term is idempotent.
|
appendTo
boolean isIdempotent()
That is, whether it always produces the same result when used multiple times. For example,
the literal 1
is idempotent, the function call now()
isn't.
This is used internally by the query builder to compute the Request.isIdempotent()
flag on the statements generated by BuildableQuery.build()
. If a term is ambiguous (for
example a raw snippet or a call to a user function), the builder is pessimistic and assumes the
term is not idempotent.
Copyright © 2017–2023. All rights reserved.