Interface SingleRestriction
- All Superinterfaces:
Restriction
- All Known Implementing Classes:
MultiColumnRestriction,MultiColumnRestriction.EQRestriction,MultiColumnRestriction.INRestriction,MultiColumnRestriction.InRestrictionWithMarker,MultiColumnRestriction.InRestrictionWithValues,MultiColumnRestriction.NotNullRestriction,MultiColumnRestriction.SliceRestriction,SingleColumnRestriction,SingleColumnRestriction.AnnRestriction,SingleColumnRestriction.ContainsRestriction,SingleColumnRestriction.EQRestriction,SingleColumnRestriction.INRestriction,SingleColumnRestriction.InRestrictionWithMarker,SingleColumnRestriction.InRestrictionWithValues,SingleColumnRestriction.IsNotNullRestriction,SingleColumnRestriction.LikeRestriction,SingleColumnRestriction.SliceRestriction
A single restriction/clause on one or multiple column.
-
Method Summary
Modifier and TypeMethodDescriptiondefault MultiCBuilderappendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options) Appends the values of theSingleRestrictionfor the specified bound to the specified builder.appendTo(MultiCBuilder builder, QueryOptions options) Appends the values of thisSingleRestrictionto the specified builder.default booleanChecks if the specified bound is set or not.default booleanisANN()default booleandefault booleanisEQ()default booleandefault booleanisIN()default booleanisInclusive(Bound b) Checks if the specified bound is inclusive or not.default booleanisLIKE()default booleandefault booleandefault booleanisSlice()mergeWith(SingleRestriction otherRestriction) Merges this restriction with the specified one.Methods inherited from interface org.apache.cassandra.cql3.restrictions.Restriction
addFunctionsTo, addToRowFilter, findSupportingIndex, findSupportingIndexFromQueryPlan, getColumnDefs, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken, needsFiltering
-
Method Details
-
isSlice
default boolean isSlice() -
isEQ
default boolean isEQ() -
isLIKE
default boolean isLIKE() -
isIN
default boolean isIN() -
isContains
default boolean isContains() -
isANN
default boolean isANN() -
isEqualityBased
default boolean isEqualityBased()- Returns:
trueif this restriction is based on equality comparison rather than a range or negation
-
isNotNull
default boolean isNotNull() -
isMultiColumn
default boolean isMultiColumn() -
hasBound
Checks if the specified bound is set or not.- Parameters:
b- the bound type- Returns:
trueif the specified bound is set,falseotherwise
-
isInclusive
Checks if the specified bound is inclusive or not.- Parameters:
b- the bound type- Returns:
trueif the specified bound is inclusive,falseotherwise
-
mergeWith
Merges this restriction with the specified one.Restriction are immutable. Therefore merging two restrictions result in a new one. The reason behind this choice is that it allow a great flexibility in the way the merging can done while preventing any side effect.
- Parameters:
otherRestriction- the restriction to merge into this one- Returns:
- the restriction resulting of the merge
-
appendTo
Appends the values of thisSingleRestrictionto the specified builder.- Parameters:
builder- theMultiCBuilderto append to.options- the query options- Returns:
- the
MultiCBuilder
-
appendBoundTo
Appends the values of theSingleRestrictionfor the specified bound to the specified builder.- Parameters:
builder- theMultiCBuilderto append to.bound- the boundoptions- the query options- Returns:
- the
MultiCBuilder
-