org.apache.cassandra.cql3.selection

## Class Selection

- java.lang.Object
- - org.apache.cassandra.cql3.selection.Selection

-     public abstract class Selection
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Selection.ResultSetBuilder`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Selection(CFMetaData cfm, java.util.List<ColumnDefinition> columns, SelectionColumnMapping columnMapping, boolean collectTimestamps, boolean collectTTLs)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `addColumnForOrdering(ColumnDefinition c)`
    `void` | `addFunctionsTo(java.util.List<Function> functions)`
    `boolean` | `containsAComplexColumn()` Checks if this selection contains a complex column.
    `boolean` | `containsOnlyStaticColumns()` Checks if this selection contains only static columns.
    `boolean` | `containsStaticColumns()` Checks if this selection contains static columns.
    `static Selection` | `forColumns(CFMetaData cfm, java.util.List<ColumnDefinition> columns)`
    `static Selection` | `fromSelectors(CFMetaData cfm, java.util.List<RawSelector> rawSelectors, VariableSpecifications boundNames, boolean hasGroupBy)`
    `protected int` | `getColumnIndex(ColumnDefinition c)` Returns the index of the specified column
    `SelectionColumns` | `getColumnMapping()`
    `java.util.List<ColumnDefinition>` | `getColumns()`
    `ResultSet.ResultMetadata` | `getResultMetadata(boolean isJson)`
    `int` | `getResultSetIndex(ColumnDefinition c)` Returns the index of the specified column within the resultset
    `abstract boolean` | `isAggregate()`
    `boolean` | `isWildcard()`
    `protected abstract org.apache.cassandra.cql3.selection.Selection.Selectors` | `newSelectors(QueryOptions options)`
    `Selection.ResultSetBuilder` | `resultSetBuilder(QueryOptions options, boolean isJson)`
    `Selection.ResultSetBuilder` | `resultSetBuilder(QueryOptions options, boolean isJson, AggregationSpecification aggregationSpec)`
    `static java.util.List<java.nio.ByteBuffer>` | `rowToJson(java.util.List<java.nio.ByteBuffer> row, ProtocolVersion protocolVersion, ResultSet.ResultMetadata metadata)`
    `java.lang.String` | `toString()`
    `static Selection` | `wildcard(CFMetaData cfm)`

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

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

- - ### Constructor Detail

    - #### Selection

          protected Selection(CFMetaData cfm,
                              java.util.List<ColumnDefinition> columns,
                              SelectionColumnMapping columnMapping,
                              boolean collectTimestamps,
                              boolean collectTTLs)

  - ### Method Detail

    - #### isWildcard

          public boolean isWildcard()

    - #### containsStaticColumns

          public boolean containsStaticColumns()

      Checks if this selection contains static columns.
      Returns:
        `true` if this selection contains static columns, `false` otherwise;

    - #### containsOnlyStaticColumns

          public boolean containsOnlyStaticColumns()

      Checks if this selection contains only static columns.
      Returns:
        `true` if this selection contains only static columns, `false` otherwise;

    - #### containsAComplexColumn

          public boolean containsAComplexColumn()

      Checks if this selection contains a complex column.
      Returns:
        `true` if this selection contains a multicell collection or UDT, `false` otherwise.

    - #### getResultMetadata

          public ResultSet.ResultMetadata getResultMetadata(boolean isJson)

    - #### wildcard

          public static Selection wildcard(CFMetaData cfm)

    - #### forColumns

          public static Selection forColumns(CFMetaData cfm,
                                             java.util.List<ColumnDefinition> columns)

    - #### addColumnForOrdering

          public int addColumnForOrdering(ColumnDefinition c)

    - #### addFunctionsTo

          public void addFunctionsTo(java.util.List<Function> functions)

    - #### fromSelectors

          public static Selection fromSelectors(CFMetaData cfm,
                                                java.util.List<RawSelector> rawSelectors,
                                                VariableSpecifications boundNames,
                                                boolean hasGroupBy)

    - #### getResultSetIndex

          public int getResultSetIndex(ColumnDefinition c)

      Returns the index of the specified column within the resultset
      Parameters:
        `c` - the column
      Returns:
        the index of the specified column within the resultset or -1

    - #### getColumnIndex

          protected final int getColumnIndex(ColumnDefinition c)

      Returns the index of the specified column
      Parameters:
        `c` - the column
      Returns:
        the index of the specified column or -1

    - #### newSelectors

          protected abstract org.apache.cassandra.cql3.selection.Selection.Selectors newSelectors(QueryOptions options)
                                                                                           throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### getColumns

          public java.util.List<ColumnDefinition> getColumns()

      Returns:
        the list of CQL3 columns value this SelectionClause needs.

    - #### getColumnMapping

          public SelectionColumns getColumnMapping()

      Returns:
        the mappings between resultset columns and the underlying columns

    - #### resultSetBuilder

          public Selection.ResultSetBuilder resultSetBuilder(QueryOptions options,
                                                             boolean isJson)

    - #### resultSetBuilder

          public Selection.ResultSetBuilder resultSetBuilder(QueryOptions options,
                                                             boolean isJson,
                                                             AggregationSpecification aggregationSpec)

    - #### isAggregate

          public abstract boolean isAggregate()

    - #### toString

          public java.lang.String toString()

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

    - #### rowToJson

          public static java.util.List<java.nio.ByteBuffer> rowToJson(java.util.List<java.nio.ByteBuffer> row,
                                                                      ProtocolVersion protocolVersion,
                                                                      ResultSet.ResultMetadata metadata)

Copyright © 2018 The Apache Software Foundation