public static final class TokenRestriction.EQ extends TokenRestriction
TokenRestriction.EQ, TokenRestriction.Slice
Modifier and Type | Field and Description |
---|---|
protected CType |
ctype
The composite type.
|
columnDefs
Constructor and Description |
---|
EQ(CType ctype,
java.util.List<ColumnDefinition> columnDefs,
Term value) |
Modifier and Type | Method and Description |
---|---|
CompositesBuilder |
appendBoundTo(CFMetaData cfm,
CompositesBuilder builder,
Bound bound,
QueryOptions options)
Appends the values of the
Restriction for the specified bound to the specified builder. |
java.util.List<java.nio.ByteBuffer> |
bounds(CFMetaData cfm,
Bound b,
QueryOptions options) |
protected org.apache.cassandra.cql3.restrictions.PrimaryKeyRestrictions |
doMergeWith(TokenRestriction otherRestriction)
Merges this restriction with the specified
TokenRestriction . |
java.lang.Iterable<Function> |
getFunctions()
Return an Iterable over all of the functions (both native and user-defined) used by any component
of the restriction
|
boolean |
hasBound(Bound b)
Checks if the specified bound is set or not.
|
boolean |
isContains() |
boolean |
isEmpty()
Checks if this
PrimaryKeyRestrictionSet is empty or not. |
boolean |
isEQ() |
boolean |
isIN() |
boolean |
isInclusive(Bound b)
Checks if the specified bound is inclusive or not.
|
boolean |
isMultiColumn() |
boolean |
isNotReturningAnyRows(CFMetaData cfm,
QueryOptions options)
Checks if this restriction will prevent the query to return any rows.
|
boolean |
isSlice() |
protected static Bound |
reverseBoundIfNeeded(ColumnDefinition columnDefinition,
Bound bound)
Reverses the specified bound if the column type is a reversed one.
|
int |
size()
Returns the number of columns that have a restriction.
|
protected static java.nio.ByteBuffer |
validateIndexedValue(ColumnSpecification columnSpec,
java.nio.ByteBuffer value) |
java.util.List<java.nio.ByteBuffer> |
values(CFMetaData cfm,
QueryOptions options) |
addIndexExpressionTo, appendTo, boundsAsComposites, getColumnDefs, getColumnNamesAsString, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken, mergeWith, valuesAsComposites
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendBoundTo, hasBound, isContains, isIN, isInclusive, isMultiColumn, isNotReturningAnyRows, isSlice
protected final CType ctype
public EQ(CType ctype, java.util.List<ColumnDefinition> columnDefs, Term value)
public boolean isEQ()
isEQ
in interface Restriction
public java.lang.Iterable<Function> getFunctions()
Restriction
protected org.apache.cassandra.cql3.restrictions.PrimaryKeyRestrictions doMergeWith(TokenRestriction otherRestriction) throws InvalidRequestException
TokenRestriction
TokenRestriction
.doMergeWith
in class TokenRestriction
otherRestriction
- the TokenRestriction
to merge with.InvalidRequestException
public java.util.List<java.nio.ByteBuffer> values(CFMetaData cfm, QueryOptions options) throws InvalidRequestException
InvalidRequestException
public java.util.List<java.nio.ByteBuffer> bounds(CFMetaData cfm, Bound b, QueryOptions options) throws InvalidRequestException
InvalidRequestException
public final boolean isEmpty()
PrimaryKeyRestrictionSet
is empty or not.true
if this PrimaryKeyRestrictionSet
is empty, false
otherwise.public final int size()
public boolean isMultiColumn()
isMultiColumn
in interface Restriction
public boolean isSlice()
isSlice
in interface Restriction
public boolean isIN()
isIN
in interface Restriction
public boolean isContains()
isContains
in interface Restriction
public boolean hasBound(Bound b)
Restriction
hasBound
in interface Restriction
b
- the bound typetrue
if the specified bound is set, false
otherwisepublic CompositesBuilder appendBoundTo(CFMetaData cfm, CompositesBuilder builder, Bound bound, QueryOptions options)
Restriction
Restriction
for the specified bound to the specified builder.appendBoundTo
in interface Restriction
cfm
- the table metadatabuilder
- the CompositesBuilder
to append to.bound
- the boundoptions
- the query optionsCompositesBuilder
public boolean isInclusive(Bound b)
Restriction
isInclusive
in interface Restriction
b
- the bound typetrue
if the specified bound is inclusive, false
otherwisepublic boolean isNotReturningAnyRows(CFMetaData cfm, QueryOptions options)
Restriction
isNotReturningAnyRows
in interface Restriction
cfm
- the table metadataoptions
- the query optionstrue
if this restriction will prevent the query to return any rows, otherwiseprotected static java.nio.ByteBuffer validateIndexedValue(ColumnSpecification columnSpec, java.nio.ByteBuffer value) throws InvalidRequestException
InvalidRequestException
protected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)
columnDefinition
- the column definitionbound
- the boundCopyright © 2020 The Apache Software Foundation