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 interfaceSelection.Selectors
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.cassandra.cql3.selection.ColumnFilterFactorycolumnFilterFactoryprotected booleanisJsonprotected ResultSet.ResultMetadatametadataprotected java.util.List<ColumnMetadata>orderingColumns
-
Constructor Summary
Constructors Modifier Constructor Description protectedSelection(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 voidaddFunctionsTo(java.util.List<Function> functions)booleancontainsStaticColumns()Checks if this selection contains static columns.static SelectionforColumns(TableMetadata table, java.util.List<ColumnMetadata> columns, boolean returnStaticContentOnPartitionWithNoRows)static SelectionfromSelectors(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 intgetColumnIndex(ColumnMetadata c)Returns the index of the specified columnSelectionColumnsgetColumnMapping()java.util.List<ColumnMetadata>getColumns()java.lang.IntegergetOrderingIndex(ColumnMetadata c)Returns the corresponding column index used for post query orderingResultSet.ResultMetadatagetResultMetadata()intgetResultSetIndex(ColumnMetadata c)Returns the index of the specified column within the resultsetabstract booleanisAggregate()booleanisWildcard()abstract Selection.SelectorsnewSelectors(QueryOptions options)java.lang.StringtoString()static Selectionwildcard(TableMetadata table, boolean isJson, boolean returnStaticContentOnPartitionWithNoRows)static SelectionwildcardWithGroupBy(TableMetadata table, VariableSpecifications boundNames, 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:
trueif this selection contains static columns,falseotherwise;
-
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)
-
wildcardWithGroupBy
public static Selection wildcardWithGroupBy(TableMetadata table, VariableSpecifications boundNames, 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:
toStringin classjava.lang.Object
-
-