Package org.apache.cassandra.db.filter
Class RowFilter.Expression
java.lang.Object
org.apache.cassandra.db.filter.RowFilter.Expression
- Direct Known Subclasses:
RowFilter.CustomExpression,RowFilter.SimpleExpression,RowFilter.UserExpression
- Enclosing class:
- RowFilter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ColumnMetadataprotected final Operatorprotected final ByteBuffer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExpression(ColumnMetadata column, Operator operator, ByteBuffer value) -
Method Summary
Modifier and TypeMethodDescriptioncolumn()booleanIf this expression is used to query an index, the value to use as partition key for that index query.protected ByteBuffergetValue(TableMetadata metadata, DecoratedKey partitionKey, Row row, long nowInSec) inthashCode()booleanChecks if the operator of thisIndexExpressionis aCONTAINSoperator.booleanChecks if the operator of thisIndexExpressionis aCONTAINS_KEYoperator.booleanisCustom()abstract booleanisSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey, Row row, long nowInSec) Returns whether the provided row satisfied this expression or not.booleanprotected abstract RowFilter.Expression.Kindkind()operator()Returns a CQL representation of this expression.toString()protected abstract StringtoString(boolean cql) voidvalidate()voidDeprecated.See CASSANDRA-6377
-
Field Details
-
column
-
operator
-
value
-
-
Constructor Details
-
Expression
-
-
Method Details
-
kind
-
isCustom
public boolean isCustom() -
isUserDefined
public boolean isUserDefined() -
column
-
operator
-
isContains
public boolean isContains()Checks if the operator of thisIndexExpressionis aCONTAINSoperator.- Returns:
trueif the operator of thisIndexExpressionis aCONTAINSoperator,falseotherwise.
-
isContainsKey
public boolean isContainsKey()Checks if the operator of thisIndexExpressionis aCONTAINS_KEYoperator.- Returns:
trueif the operator of thisIndexExpressionis aCONTAINS_KEYoperator,falseotherwise.
-
getIndexValue
If this expression is used to query an index, the value to use as partition key for that index query. -
validate
public void validate() -
validateForIndexing
Deprecated.See CASSANDRA-6377 -
isSatisfiedBy
public abstract boolean isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey, Row row, long nowInSec) Returns whether the provided row satisfied this expression or not.- Parameters:
metadata-partitionKey- the partition key for row to check.row- the row to check. It should *not* contain deleted cells (i.e. it should come from a RowIterator).- Returns:
- whether the row is satisfied by this expression.
-
getValue
protected ByteBuffer getValue(TableMetadata metadata, DecoratedKey partitionKey, Row row, long nowInSec) -
equals
-
hashCode
public int hashCode() -
toString
-
toCQLString
Returns a CQL representation of this expression.- Returns:
- a CQL representation of this expression
-
toString
-