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 void
addColumnMapping(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.void
addFetchedColumns(ColumnFilter.Builder builder)
boolean
areAllFetchedColumnsKnown()
ColumnMetadata
getColumn()
protected java.lang.String
getColumnName()
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.boolean
isSimpleSelectorFactory()
Checks if this factory createsSelector
s that simply return a column value.boolean
isSimpleSelectorFactoryFor(int index)
Checks if this factory createsSelector
s that simply return the specified column.Selector
newInstance(QueryOptions options)
Creates a newSelector
instance.-
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.Factory
Returns the name of the column corresponding to the output value of the selector instances created by this factory.- Specified by:
getColumnName
in classSelector.Factory
- Returns:
- a column name
-
getReturnType
protected AbstractType<?> getReturnType()
Description copied from class:Selector.Factory
Returns the type of the values returned by the selector instances created by this factory.- Specified by:
getReturnType
in classSelector.Factory
- Returns:
- the selector output type
-
addColumnMapping
protected void addColumnMapping(SelectionColumnMapping mapping, ColumnSpecification resultColumn)
Description copied from class:Selector.Factory
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. 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:
addColumnMapping
in 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.Factory
Creates a newSelector
instance.- Specified by:
newInstance
in 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
Selector
instance
-
isSimpleSelectorFactory
public boolean isSimpleSelectorFactory()
Description copied from class:Selector.Factory
Checks if this factory createsSelector
s that simply return a column value.- Overrides:
isSimpleSelectorFactory
in classSelector.Factory
- Returns:
true
if this factory createsSelector
s that simply return a column value,false
otherwise.
-
isSimpleSelectorFactoryFor
public boolean isSimpleSelectorFactoryFor(int index)
Description copied from class:Selector.Factory
Checks if this factory createsSelector
s that simply return the specified column.- Overrides:
isSimpleSelectorFactoryFor
in classSelector.Factory
- Parameters:
index
- the column index- Returns:
true
if this factory createsSelector
s that simply return the specified column,false
otherwise.
-
areAllFetchedColumnsKnown
public boolean areAllFetchedColumnsKnown()
-
addFetchedColumns
public void addFetchedColumns(ColumnFilter.Builder builder)
-
getColumn
public ColumnMetadata getColumn()
-
-