MultiColumnRestriction.InWithValues (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.cql3.restrictions

## Class MultiColumnRestriction.InWithValues

- java.lang.Object
- - org.apache.cassandra.cql3.restrictions.MultiColumnRestriction
  - - org.apache.cassandra.cql3.restrictions.MultiColumnRestriction.IN
    - - org.apache.cassandra.cql3.restrictions.MultiColumnRestriction.InWithValues

- All Implemented Interfaces:
    Restriction
  Enclosing class:
    MultiColumnRestriction

      public static class MultiColumnRestriction.InWithValues
      extends MultiColumnRestriction.IN

  An IN restriction that has a set of terms for in values. For example: "SELECT ... WHERE (a, b, c) IN ((1, 2, 3), (4, 5, 6))" or "WHERE (a, b, c) IN (?, ?)"

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction

      `MultiColumnRestriction.EQ, MultiColumnRestriction.IN, MultiColumnRestriction.InWithMarker, MultiColumnRestriction.InWithValues, MultiColumnRestriction.Slice`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<Term>` | `values`

    - ### Fields inherited from class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction

      `columnDefs`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InWithValues(java.util.List<ColumnDefinition> columnDefs, java.util.List<Term> values)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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.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` | `isEQ()`
    `boolean` | `isInclusive(Bound b)` Checks if the specified bound is inclusive or not.
    `boolean` | `isNotReturningAnyRows(CFMetaData cfm, QueryOptions options)` Checks if this restriction will prevent the query to return any rows.
    `boolean` | `isOnToken()`
    `boolean` | `isSlice()`
    `protected static Bound` | `reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)` Reverses the specified bound if the column type is a reversed one.
    `protected java.util.List<java.util.List<java.nio.ByteBuffer>>` | `splitValues(QueryOptions options)`
    `java.lang.String` | `toString()`
    `protected static java.nio.ByteBuffer` | `validateIndexedValue(ColumnSpecification columnSpec, java.nio.ByteBuffer value)`

    - ### Methods inherited from class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction.IN

      `addIndexExpressionTo, appendTo, doMergeWith, isIN, isSupportedBy`

    - ### Methods inherited from class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction

      `getColumnDefs, getColumnsInCommons, getFirstColumn, getLastColumn, hasSupportingIndex, isMultiColumn, mergeWith`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### values

          protected final java.util.List<Term> values

  - ### Constructor Detail

    - #### InWithValues

          public InWithValues(java.util.List<ColumnDefinition> columnDefs,
                              java.util.List<Term> values)

  - ### Method Detail

    - #### getFunctions

          public java.lang.Iterable<Function> getFunctions()

      Description copied from interface: `Restriction`
      Return an Iterable over all of the functions (both native and user-defined) used by any component of the restriction
      Returns:
        functions all functions found (may contain duplicates)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### splitValues

          protected java.util.List<java.util.List<java.nio.ByteBuffer>> splitValues(QueryOptions options)
                                                                             throws InvalidRequestException

      Specified by:
        `splitValues` in class `MultiColumnRestriction.IN`
      Throws:
        `InvalidRequestException`

    - #### isOnToken

          public boolean isOnToken()

      Specified by:
        `isOnToken` in interface `Restriction`

    - #### isSlice

          public boolean isSlice()

      Specified by:
        `isSlice` in interface `Restriction`

    - #### isEQ

          public boolean isEQ()

      Specified by:
        `isEQ` in interface `Restriction`

    - #### isContains

          public boolean isContains()

      Specified by:
        `isContains` in interface `Restriction`

    - #### hasBound

          public boolean hasBound(Bound b)

      Description copied from interface: `Restriction`
      Checks if the specified bound is set or not.
      Specified by:
        `hasBound` in interface `Restriction`
      Parameters:
        `b` - the bound type
      Returns:
        `true` if the specified bound is set, `false` otherwise

    - #### appendBoundTo

          public CompositesBuilder appendBoundTo(CFMetaData cfm,
                                                 CompositesBuilder builder,
                                                 Bound bound,
                                                 QueryOptions options)

      Description copied from interface: `Restriction`
      Appends the values of the `Restriction` for the specified bound to the specified builder.
      Specified by:
        `appendBoundTo` in interface `Restriction`
      Parameters:
        `cfm` - the table metadata
        `builder` - the `CompositesBuilder` to append to.
        `bound` - the bound
        `options` - the query options
      Returns:
        the `CompositesBuilder`

    - #### isInclusive

          public boolean isInclusive(Bound b)

      Description copied from interface: `Restriction`
      Checks if the specified bound is inclusive or not.
      Specified by:
        `isInclusive` in interface `Restriction`
      Parameters:
        `b` - the bound type
      Returns:
        `true` if the specified bound is inclusive, `false` otherwise

    - #### isNotReturningAnyRows

          public boolean isNotReturningAnyRows(CFMetaData cfm,
                                               QueryOptions options)

      Description copied from interface: `Restriction`
      Checks if this restriction will prevent the query to return any rows.
      Specified by:
        `isNotReturningAnyRows` in interface `Restriction`
      Parameters:
        `cfm` - the table metadata
        `options` - the query options
      Returns:
        `true` if this restriction will prevent the query to return any rows, otherwise

    - #### validateIndexedValue

          protected static java.nio.ByteBuffer validateIndexedValue(ColumnSpecification columnSpec,
                                                                    java.nio.ByteBuffer value)
                                                             throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### reverseBoundIfNeeded

          protected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition,
                                                      Bound bound)

      Reverses the specified bound if the column type is a reversed one.
      Parameters:
        `columnDefinition` - the column definition
        `bound` - the bound
      Returns:
        the bound reversed if the column type was a reversed one or the original bound

Copyright © 2018 The Apache Software Foundation