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 Description static interface
Selection.Selectors
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.cassandra.cql3.selection.ColumnFilterFactory
columnFilterFactory
protected boolean
isJson
protected ResultSet.ResultMetadata
metadata
protected java.util.List<ColumnMetadata>
orderingColumns
-
Constructor Summary
Constructors Modifier Constructor Description protected
Selection(TableMetadata table, java.util.List<ColumnMetadata> selectedColumns, java.util.Set<ColumnMetadata> orderingColumns, SelectionColumnMapping columnMapping, org.apache.cassandra.cql3.selection.ColumnFilterFactory columnFilterFactory, boolean isJson)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addFunctionsTo(java.util.List<Function> functions)
boolean
containsStaticColumns()
Checks if this selection contains static columns.static Selection
forColumns(TableMetadata table, java.util.List<ColumnMetadata> columns, boolean returnStaticContentOnPartitionWithNoRows)
static Selection
fromSelectors(TableMetadata table, java.util.List<Selectable> selectables, VariableSpecifications boundNames, java.util.Set<ColumnMetadata> orderingColumns, java.util.Set<ColumnMetadata> nonPKRestrictedColumns, boolean hasGroupBy, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)
protected int
getColumnIndex(ColumnMetadata c)
Returns the index of the specified columnSelectionColumns
getColumnMapping()
java.util.List<ColumnMetadata>
getColumns()
java.lang.Integer
getOrderingIndex(ColumnMetadata c)
Returns the corresponding column index used for post query orderingResultSet.ResultMetadata
getResultMetadata()
int
getResultSetIndex(ColumnMetadata c)
Returns the index of the specified column within the resultsetabstract boolean
isAggregate()
boolean
isWildcard()
abstract Selection.Selectors
newSelectors(QueryOptions options)
java.lang.String
toString()
static Selection
wildcard(TableMetadata table, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)
static Selection
wildcardWithGroupByOrMaskedColumns(TableMetadata table, VariableSpecifications boundNames, java.util.Set<ColumnMetadata> orderingColumns, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)
-
-
-
Field Detail
-
metadata
protected final ResultSet.ResultMetadata metadata
-
columnFilterFactory
protected final org.apache.cassandra.cql3.selection.ColumnFilterFactory columnFilterFactory
-
isJson
protected final boolean isJson
-
orderingColumns
protected final java.util.List<ColumnMetadata> orderingColumns
-
-
Constructor Detail
-
Selection
protected Selection(TableMetadata table, java.util.List<ColumnMetadata> selectedColumns, java.util.Set<ColumnMetadata> orderingColumns, SelectionColumnMapping columnMapping, org.apache.cassandra.cql3.selection.ColumnFilterFactory columnFilterFactory, boolean isJson)
-
-
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;
-
getOrderingIndex
public java.lang.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, java.util.Set<ColumnMetadata> orderingColumns, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)
-
forColumns
public static Selection forColumns(TableMetadata table, java.util.List<ColumnMetadata> columns, boolean returnStaticContentOnPartitionWithNoRows)
-
addFunctionsTo
public void addFunctionsTo(java.util.List<Function> functions)
-
fromSelectors
public static Selection fromSelectors(TableMetadata table, java.util.List<Selectable> selectables, VariableSpecifications boundNames, java.util.Set<ColumnMetadata> orderingColumns, java.util.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 java.util.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-