public final class ColumnMetadata extends ColumnSpecification implements Selectable, java.lang.Comparable<ColumnMetadata>
Modifier and Type | Class and Description |
---|---|
static class |
ColumnMetadata.ClusteringOrder |
static class |
ColumnMetadata.Kind
The type of CQL3 column this definition represents.
|
Selectable.BetweenParenthesesOrWithTuple, Selectable.Raw, Selectable.RawIdentifier, Selectable.WithCast, Selectable.WithElementSelection, Selectable.WithFieldSelection, Selectable.WithFunction, Selectable.WithList, Selectable.WithMapOrUdt, Selectable.WithSet, Selectable.WithSliceSelection, Selectable.WithTerm, Selectable.WithToJSonFunction, Selectable.WithTypeHint, Selectable.WritetimeOrTTL
AssignmentTestable.TestResult
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<java.lang.Object> |
asymmetricColumnDataComparator |
ColumnMetadata.Kind |
kind |
static int |
NO_POSITION |
cfName, ksName, name, type
Constructor and Description |
---|
ColumnMetadata(java.lang.String ksName,
java.lang.String cfName,
ColumnIdentifier name,
AbstractType<?> type,
int position,
ColumnMetadata.Kind kind) |
ColumnMetadata(TableMetadata table,
java.nio.ByteBuffer name,
AbstractType<?> type,
int position,
ColumnMetadata.Kind kind) |
Modifier and Type | Method and Description |
---|---|
void |
appendCqlTo(CqlBuilder builder) |
void |
appendNameAndOrderTo(CqlBuilder builder) |
java.util.Comparator<java.lang.Object> |
asymmetricCellPathComparator() |
java.util.Comparator<? super Cell<?>> |
cellComparator() |
java.util.Comparator<CellPath> |
cellPathComparator() |
CellPath.Serializer |
cellPathSerializer() |
AbstractType<?> |
cellValueType()
The type of the cell values for cell belonging to this column.
|
static ColumnMetadata |
clusteringColumn(java.lang.String keyspace,
java.lang.String table,
java.lang.String name,
AbstractType<?> type,
int position) |
static ColumnMetadata |
clusteringColumn(TableMetadata table,
java.nio.ByteBuffer name,
AbstractType<?> type,
int position) |
ColumnMetadata.ClusteringOrder |
clusteringOrder() |
int |
compareTo(ColumnMetadata other) |
ColumnMetadata |
copy() |
java.lang.String |
debugString() |
boolean |
equals(java.lang.Object o) |
AbstractType<?> |
getExactTypeIfKnown(java.lang.String keyspace)
The type of the
Selectable if it can be infered. |
int |
hashCode() |
boolean |
isClusteringColumn() |
boolean |
isComplex() |
boolean |
isCounterColumn()
Check if column is counter type.
|
boolean |
isPartitionKey() |
boolean |
isPrimaryKeyColumn() |
boolean |
isRegular() |
boolean |
isSimple() |
boolean |
isStatic() |
Selector.Factory |
newSelectorFactory(TableMetadata table,
AbstractType<?> expectedType,
java.util.List<ColumnMetadata> defs,
VariableSpecifications boundNames) |
static ColumnMetadata |
partitionKeyColumn(java.lang.String keyspace,
java.lang.String table,
java.lang.String name,
AbstractType<?> type,
int position) |
static ColumnMetadata |
partitionKeyColumn(TableMetadata table,
java.nio.ByteBuffer name,
AbstractType<?> type,
int position) |
int |
position() |
boolean |
processesSelection()
Checks if any processing is performed on the selected columns,
false otherwise. |
static ColumnMetadata |
regularColumn(java.lang.String keyspace,
java.lang.String table,
java.lang.String name,
AbstractType<?> type) |
static ColumnMetadata |
regularColumn(TableMetadata table,
java.nio.ByteBuffer name,
AbstractType<?> type) |
boolean |
selectColumns(java.util.function.Predicate<ColumnMetadata> predicate)
Checks if this
Selectable select columns matching the specified predicate. |
static ColumnMetadata |
staticColumn(java.lang.String keyspace,
java.lang.String table,
java.lang.String name,
AbstractType<?> type) |
static ColumnMetadata |
staticColumn(TableMetadata table,
java.nio.ByteBuffer name,
AbstractType<?> type) |
static java.lang.String |
toCQLString(java.lang.Iterable<ColumnMetadata> defs) |
static java.lang.String |
toCQLString(java.util.Iterator<ColumnMetadata> defs) |
static java.util.Collection<ColumnIdentifier> |
toIdentifiers(java.util.Collection<ColumnMetadata> definitions)
Converts the specified column definitions into column identifiers.
|
java.lang.String |
toString() |
<V> void |
validateCell(Cell<V> cell) |
ColumnMetadata |
withNewName(ColumnIdentifier newName) |
ColumnMetadata |
withNewType(AbstractType<?> newType) |
allInSameTable, isReversedType, withAlias
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAndGetIndex, selectColumns, specForElementOrSlice, testAssignment
public static final java.util.Comparator<java.lang.Object> asymmetricColumnDataComparator
public static final int NO_POSITION
public final ColumnMetadata.Kind kind
public ColumnMetadata(TableMetadata table, java.nio.ByteBuffer name, AbstractType<?> type, int position, ColumnMetadata.Kind kind)
public ColumnMetadata(java.lang.String ksName, java.lang.String cfName, ColumnIdentifier name, AbstractType<?> type, int position, ColumnMetadata.Kind kind)
public static ColumnMetadata partitionKeyColumn(TableMetadata table, java.nio.ByteBuffer name, AbstractType<?> type, int position)
public static ColumnMetadata partitionKeyColumn(java.lang.String keyspace, java.lang.String table, java.lang.String name, AbstractType<?> type, int position)
public static ColumnMetadata clusteringColumn(TableMetadata table, java.nio.ByteBuffer name, AbstractType<?> type, int position)
public static ColumnMetadata clusteringColumn(java.lang.String keyspace, java.lang.String table, java.lang.String name, AbstractType<?> type, int position)
public static ColumnMetadata regularColumn(TableMetadata table, java.nio.ByteBuffer name, AbstractType<?> type)
public static ColumnMetadata regularColumn(java.lang.String keyspace, java.lang.String table, java.lang.String name, AbstractType<?> type)
public static ColumnMetadata staticColumn(TableMetadata table, java.nio.ByteBuffer name, AbstractType<?> type)
public static ColumnMetadata staticColumn(java.lang.String keyspace, java.lang.String table, java.lang.String name, AbstractType<?> type)
public ColumnMetadata copy()
public ColumnMetadata withNewName(ColumnIdentifier newName)
public ColumnMetadata withNewType(AbstractType<?> newType)
public boolean isPartitionKey()
public boolean isClusteringColumn()
public boolean isStatic()
public boolean isRegular()
public ColumnMetadata.ClusteringOrder clusteringOrder()
public int position()
public boolean equals(java.lang.Object o)
equals
in class ColumnSpecification
public int hashCode()
hashCode
in class ColumnSpecification
public java.lang.String toString()
toString
in class ColumnSpecification
public java.lang.String debugString()
public boolean isPrimaryKeyColumn()
public boolean selectColumns(java.util.function.Predicate<ColumnMetadata> predicate)
Selectable
Selectable
select columns matching the specified predicate.selectColumns
in interface Selectable
true
if this Selectable
select columns matching the specified predicate,
false
otherwise.public boolean processesSelection()
Selectable
false
otherwise.processesSelection
in interface Selectable
true
if any processing is performed on the selected columns, false
otherwise.public static java.util.Collection<ColumnIdentifier> toIdentifiers(java.util.Collection<ColumnMetadata> definitions)
definitions
- the column definitions to convert.public int compareTo(ColumnMetadata other)
compareTo
in interface java.lang.Comparable<ColumnMetadata>
public java.util.Comparator<CellPath> cellPathComparator()
public java.util.Comparator<java.lang.Object> asymmetricCellPathComparator()
public java.util.Comparator<? super Cell<?>> cellComparator()
public boolean isComplex()
public boolean isSimple()
public CellPath.Serializer cellPathSerializer()
public <V> void validateCell(Cell<V> cell)
public void appendCqlTo(CqlBuilder builder)
public static java.lang.String toCQLString(java.lang.Iterable<ColumnMetadata> defs)
public static java.lang.String toCQLString(java.util.Iterator<ColumnMetadata> defs)
public void appendNameAndOrderTo(CqlBuilder builder)
public AbstractType<?> cellValueType()
public boolean isCounterColumn()
public Selector.Factory newSelectorFactory(TableMetadata table, AbstractType<?> expectedType, java.util.List<ColumnMetadata> defs, VariableSpecifications boundNames) throws InvalidRequestException
newSelectorFactory
in interface Selectable
InvalidRequestException
public AbstractType<?> getExactTypeIfKnown(java.lang.String keyspace)
Selectable
Selectable
if it can be infered.getExactTypeIfKnown
in interface Selectable
keyspace
- the keyspace on which the statement for which this is a
Selectable
is on.Selectable
if inferrable, or null
otherwise (for instance, the type isn't inferable for a bind marker. Even for
literals, the exact type is not inferrable since they are valid for many
different types and so this will return null
too).Copyright © 2009-2021 The Apache Software Foundation