Class Selection

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

public abstract class Selection extends Object
  • Field Details

    • metadata

      protected final ResultSet.ResultMetadata metadata
    • columnFilterFactory

      protected final org.apache.cassandra.cql3.selection.ColumnFilterFactory columnFilterFactory
    • isJson

      protected final boolean isJson
    • orderingColumns

      protected final List<ColumnMetadata> orderingColumns
  • Constructor Details

  • Method Details

    • 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;
    • getOrderingIndex

      public Integer getOrderingIndex(ColumnMetadata c)
      Returns the corresponding column index used for post query ordering
      Parameters:
      c - ordering column
      Returns:
    • getResultMetadata

      public ResultSet.ResultMetadata getResultMetadata()
    • wildcard

      public static Selection wildcard(TableMetadata table, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)
    • wildcardWithGroupByOrMaskedColumns

      public static Selection wildcardWithGroupByOrMaskedColumns(TableMetadata table, VariableSpecifications boundNames, Set<ColumnMetadata> orderingColumns, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)
    • forColumns

      public static Selection forColumns(TableMetadata table, List<ColumnMetadata> columns, boolean returnStaticContentOnPartitionWithNoRows)
    • addFunctionsTo

      public void addFunctionsTo(List<Function> functions)
    • fromSelectors

      public static Selection fromSelectors(TableMetadata table, List<Selectable> selectables, VariableSpecifications boundNames, Set<ColumnMetadata> orderingColumns, Set<ColumnMetadata> nonPKRestrictedColumns, boolean hasGroupBy, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)
    • getResultSetIndex

      public int getResultSetIndex(ColumnMetadata 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(ColumnMetadata c)
      Returns the index of the specified column
      Parameters:
      c - the column
      Returns:
      the index of the specified column or -1
    • newSelectors

      public abstract Selection.Selectors newSelectors(QueryOptions options)
    • getColumns

      public List<ColumnMetadata> 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
    • isAggregate

      public abstract boolean isAggregate()
    • toString

      public String toString()
      Overrides:
      toString in class Object