Package org.apache.cassandra.cql3
Interface Terms
-
public interface Terms
A set ofTerms
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List
UNSET_LIST
TheList
returned when the list was not set.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static void
addFunctions(java.lang.Iterable<Term> terms, java.util.List<Function> functions)
Adds all functions (native and user-defined) of the specified terms to the list.void
addFunctionsTo(java.util.List<Function> functions)
Adds all functions (native and user-defined) used by any of the terms to the specified list.static java.nio.ByteBuffer
asBytes(java.lang.String keyspace, java.lang.String term, AbstractType type)
java.util.List<Term.Terminal>
bind(QueryOptions options)
Bind the values in these terms to the values contained inoptions
.java.util.List<java.nio.ByteBuffer>
bindAndGet(QueryOptions options)
void
collectMarkerSpecification(VariableSpecifications boundNames)
Collects the column specifications for the bind variables in the terms.static Terms
of(java.util.List<Term> terms)
Creates aTerms
containing a set ofTerm
.static Terms
of(Term term)
Creates aTerms
containing a singleTerm
.static Terms
ofListMarker(Lists.Marker marker, AbstractType<?> type)
Creates aTerms
for the specified list marker.
-
-
-
Method Detail
-
addFunctionsTo
void addFunctionsTo(java.util.List<Function> functions)
Adds all functions (native and user-defined) used by any of the terms to the specified list.- Parameters:
functions
- the list to add to
-
collectMarkerSpecification
void collectMarkerSpecification(VariableSpecifications boundNames)
Collects the column specifications for the bind variables in the terms. This is obviously a no-op if the terms are Terminal.- Parameters:
boundNames
- the variables specification where to collect the bind variables of the terms in.
-
bind
java.util.List<Term.Terminal> bind(QueryOptions options)
Bind the values in these terms to the values contained inoptions
. 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 these NonTerminals or an
UNSET_LIST
if the term was unset.
-
bindAndGet
java.util.List<java.nio.ByteBuffer> bindAndGet(QueryOptions options)
-
ofListMarker
static Terms ofListMarker(Lists.Marker marker, AbstractType<?> type)
Creates aTerms
for the specified list marker.- Parameters:
marker
- the list markertype
- the element type- Returns:
- a
Terms
for the specified list marker
-
of
static Terms of(Term term)
Creates aTerms
containing a singleTerm
.- Parameters:
term
- theTerm
- Returns:
- a
Terms
containing a singleTerm
.
-
of
static Terms of(java.util.List<Term> terms)
Creates aTerms
containing a set ofTerm
.- Parameters:
term
- theTerm
- Returns:
- a
Terms
containing a set ofTerm
.
-
addFunctions
static void addFunctions(java.lang.Iterable<Term> terms, java.util.List<Function> functions)
Adds all functions (native and user-defined) of the specified terms to the list.- Parameters:
functions
- the list to add to
-
asBytes
static java.nio.ByteBuffer asBytes(java.lang.String keyspace, java.lang.String term, AbstractType type)
-
-