public interface RelationMetadata extends Describable
Modifier and Type | Method and Description |
---|---|
Map<? extends ColumnMetadata,ClusteringOrder> |
getClusteringColumns() |
default Optional<? extends ColumnMetadata> |
getColumn(CqlIdentifier columnId) |
default Optional<? extends ColumnMetadata> |
getColumn(String columnName)
Shortcut for
getColumn(CqlIdentifier.fromCql(columnName)) . |
Map<CqlIdentifier,? extends ColumnMetadata> |
getColumns() |
Optional<UUID> |
getId()
The unique id generated by the server for this element.
|
CqlIdentifier |
getKeyspace() |
CqlIdentifier |
getName() |
Map<CqlIdentifier,Object> |
getOptions()
The options of this table or materialized view.
|
List<? extends ColumnMetadata> |
getPartitionKey() |
default List<? extends ColumnMetadata> |
getPrimaryKey()
Convenience method to get all the primary key columns (partition key + clustering columns) in a
single call.
|
describe, describeWithChildren
@NonNull CqlIdentifier getKeyspace()
@NonNull CqlIdentifier getName()
@NonNull default List<? extends ColumnMetadata> getPrimaryKey()
Note that this creates a new list instance on each call.
getPartitionKey()
,
getClusteringColumns()
@NonNull List<? extends ColumnMetadata> getPartitionKey()
@NonNull Map<? extends ColumnMetadata,ClusteringOrder> getClusteringColumns()
@NonNull Map<CqlIdentifier,? extends ColumnMetadata> getColumns()
@NonNull default Optional<? extends ColumnMetadata> getColumn(@NonNull CqlIdentifier columnId)
@NonNull default Optional<? extends ColumnMetadata> getColumn(@NonNull String columnName)
getColumn(CqlIdentifier.fromCql(columnName))
.@NonNull Map<CqlIdentifier,Object> getOptions()
This corresponds to the WITH
clauses in the CREATE
statement that would
recreate this element. The exact set of keys and the types of the values depend on the server
version that this metadata was extracted from. For example, in Cassandra 2.2 and below, WITH caching
takes a string argument, whereas starting with Cassandra 3.0 it is a map.
Copyright © 2017–2018. All rights reserved.