public interface RelationMetadata extends Describable
Modifier and Type | Method and Description |
---|---|
Map<ColumnMetadata,ClusteringOrder> |
getClusteringColumns() |
default Optional<ColumnMetadata> |
getColumn(CqlIdentifier columnId) |
default Optional<ColumnMetadata> |
getColumn(String columnName)
Shortcut for
getColumn(CqlIdentifier.fromCql(columnName)) . |
Map<CqlIdentifier,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<ColumnMetadata> |
getPartitionKey() |
default List<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<ColumnMetadata> getPrimaryKey()
Note that this creates a new list instance on each call.
getPartitionKey()
,
getClusteringColumns()
@NonNull List<ColumnMetadata> getPartitionKey()
@NonNull Map<ColumnMetadata,ClusteringOrder> getClusteringColumns()
@NonNull Map<CqlIdentifier,ColumnMetadata> getColumns()
@NonNull default Optional<ColumnMetadata> getColumn(@NonNull CqlIdentifier columnId)
@NonNull default Optional<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–2020. All rights reserved.