Package org.apache.cassandra.cql3
Interface Term
- All Known Implementing Classes:
AbstractMarker,Constants.Marker,Constants.Value,FunctionCall,Lists.DelayedValue,Lists.Marker,Lists.Value,Maps.DelayedValue,Maps.Marker,Maps.Value,Sets.DelayedValue,Sets.Marker,Sets.Value,Term.MultiItemTerminal,Term.NonTerminal,Term.Terminal,Tuples.DelayedValue,Tuples.InMarker,Tuples.InValue,Tuples.Marker,Tuples.Value,UserTypes.DelayedValue,UserTypes.Marker,UserTypes.Value,Vectors.DelayedValue,Vectors.Value
public interface Term
A CQL3 term, i.e. a column value with or without bind variables.
A Term can be either terminal or non terminal. A term object is one that is typed and is obtained
from a raw term (Term.Raw) by poviding the actual receiver to which the term is supposed to be a
value of.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classA non terminal term, i.e.static classA parsed, non prepared (thus untyped) term.static classA terminal term, one that can be reduced to a byte buffer directly. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFunctionsTo(List<Function> functions) bind(QueryOptions options) Bind the values in this term to the values contained invalues.bindAndGet(QueryOptions options) A shorter for bind(values).get().voidcollectMarkerSpecification(VariableSpecifications boundNames) Collects the column specification for the bind variables in this Term.booleanWhether or not that term contains at least one bind marker.default booleanWhether that term is terminal (this is a shortcut forthis instanceof Term.Terminal).
-
Method Details
-
collectMarkerSpecification
Collects the column specification for the bind variables in this Term. This is obviously a no-op if the term is Terminal.- Parameters:
boundNames- the variables specification where to collect the bind variables of this term in.
-
bind
Bind the values in this term to the values contained invalues. This is obviously a no-op if the term is Terminal.- Parameters:
options- the values to bind markers to.- Returns:
- the result of binding all the variables of this NonTerminal (or 'this' if the term is terminal).
- Throws:
InvalidRequestException
-
bindAndGet
A shorter for bind(values).get(). We expose it mainly because for constants it can avoids allocating a temporary object between the bind and the get (note that we still want to be able to separate bind and get for collections).- Throws:
InvalidRequestException
-
containsBindMarker
boolean containsBindMarker()Whether or not that term contains at least one bind marker. Note that this is slightly different from being or not a NonTerminal, because calls to non pure functions will be NonTerminal (see #5616) even if they don't have bind markers. -
isTerminal
default boolean isTerminal()Whether that term is terminal (this is a shortcut forthis instanceof Term.Terminal). -
addFunctionsTo
-