Class SimpleSelector.SimpleSelectorFactory
java.lang.Object
org.apache.cassandra.cql3.selection.Selector.Factory
org.apache.cassandra.cql3.selection.SimpleSelector.SimpleSelectorFactory
- Enclosing class:
- SimpleSelector
The Factory for
SimpleSelector.-
Method Summary
Modifier and TypeMethodDescriptionprotected 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) booleanprotected StringReturns the name of the column corresponding to the output value of the selector instances created by this factory.protected AbstractType<?>Returns the type of the values returned by the selector instances created by this factory.booleanChecks if this factory createsSelectors that simply return a column value.booleanisSimpleSelectorFactoryFor(int index) Checks if this factory createsSelectors that simply return the specified column.newInstance(QueryOptions options) Creates a newSelectorinstance.Methods inherited from class org.apache.cassandra.cql3.selection.Selector.Factory
addFunctionsTo, getColumnSpecification, isAggregateSelectorFactory, isMaxWritetimeSelectorFactory, isTTLSelectorFactory, isWritetimeSelectorFactory
-
Method Details
-
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
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
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
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
-
getColumn
-