Class SimpleSelector.SimpleSelectorFactory
- java.lang.Object
-
- org.apache.cassandra.cql3.selection.Selector.Factory
-
- org.apache.cassandra.cql3.selection.SimpleSelector.SimpleSelectorFactory
-
- Enclosing class:
- SimpleSelector
public static final class SimpleSelector.SimpleSelectorFactory extends Selector.Factory
The Factory forSimpleSelector.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddColumnMapping(SelectionColumnMapping mapping, ColumnSpecification resultColumn)Record a mapping between the ColumnDefinitions that are used by the selector instances created by this factory and a column in the ResultSet.Metadata returned with a query.voidaddFetchedColumns(ColumnFilter.Builder builder)booleanareAllFetchedColumnsKnown()ColumnMetadatagetColumn()protected java.lang.StringgetColumnName()Returns the name of the column corresponding to the output value of the selector instances created by this factory.protected AbstractType<?>getReturnType()Returns the type of the values returned by the selector instances created by this factory.booleanisSimpleSelectorFactory()Checks if this factory createsSelectors that simply return a column value.booleanisSimpleSelectorFactoryFor(int index)Checks if this factory createsSelectors that simply return the specified column.SelectornewInstance(QueryOptions options)Creates a newSelectorinstance.-
Methods inherited from class org.apache.cassandra.cql3.selection.Selector.Factory
addFunctionsTo, getColumnSpecification, isAggregateSelectorFactory, isTTLSelectorFactory, isWritetimeSelectorFactory
-
-
-
-
Method Detail
-
getColumnName
protected java.lang.String getColumnName()
Description copied from class:Selector.FactoryReturns the name of the column corresponding to the output value of the selector instances created by this factory.- Specified by:
getColumnNamein classSelector.Factory- Returns:
- a column name
-
getReturnType
protected AbstractType<?> getReturnType()
Description copied from class:Selector.FactoryReturns the type of the values returned by the selector instances created by this factory.- Specified by:
getReturnTypein classSelector.Factory- Returns:
- the selector output type
-
addColumnMapping
protected void addColumnMapping(SelectionColumnMapping mapping, ColumnSpecification resultColumn)
Description copied from class:Selector.FactoryRecord a mapping between the ColumnDefinitions that are used by the selector instances created by this factory and a column in the ResultSet.Metadata returned with a query. In most cases, this is likely to be a 1:1 mapping, but some selector instances may utilise multiple columns (or none at all) to produce a value (i.e. functions).- Specified by:
addColumnMappingin classSelector.Factory- Parameters:
mapping- the instance of the column mapping belonging to the current query's SelectionresultColumn- the column in the ResultSet.Metadata to which the ColumnDefinitions used by the Selector are to be mapped
-
newInstance
public Selector newInstance(QueryOptions options)
Description copied from class:Selector.FactoryCreates a newSelectorinstance.- Specified by:
newInstancein classSelector.Factory- Parameters:
options- the options of the query for which the instance is created (some selector depends on the bound values in particular).- Returns:
- a new
Selectorinstance
-
isSimpleSelectorFactory
public boolean isSimpleSelectorFactory()
Description copied from class:Selector.FactoryChecks if this factory createsSelectors that simply return a column value.- Overrides:
isSimpleSelectorFactoryin classSelector.Factory- Returns:
trueif this factory createsSelectors that simply return a column value,falseotherwise.
-
isSimpleSelectorFactoryFor
public boolean isSimpleSelectorFactoryFor(int index)
Description copied from class:Selector.FactoryChecks if this factory createsSelectors that simply return the specified column.- Overrides:
isSimpleSelectorFactoryForin classSelector.Factory- Parameters:
index- the column index- Returns:
trueif this factory createsSelectors that simply return the specified column,falseotherwise.
-
areAllFetchedColumnsKnown
public boolean areAllFetchedColumnsKnown()
-
addFetchedColumns
public void addFetchedColumns(ColumnFilter.Builder builder)
-
getColumn
public ColumnMetadata getColumn()
-
-