|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.datastax.driver.core.TableMetadata
public class TableMetadata
Describes a Table.
Nested Class Summary | |
---|---|
static class |
TableMetadata.Options
|
Method Summary | |
---|---|
String |
asCQLQuery()
Returns a CQL query representing this table. |
String |
exportAsString()
Returns a String containing CQL queries representing this
table and the index on it. |
List<ColumnMetadata> |
getClusteringKey()
Returns the list of columns composing the clustering key for this table. |
ColumnMetadata |
getColumn(String name)
Returns metadata on a column of this table. |
List<ColumnMetadata> |
getColumns()
Returns a list containing all the columns of this table. |
KeyspaceMetadata |
getKeyspace()
Returns the keyspace this table belong to. |
String |
getName()
Returns the name of this table. |
TableMetadata.Options |
getOptions()
Returns the options for this table. |
List<ColumnMetadata> |
getPartitionKey()
Returns the list of columns composing the partition key for this table. |
List<ColumnMetadata> |
getPrimaryKey()
Returns the list of columns composing the primary key for this table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getName()
public KeyspaceMetadata getKeyspace()
public ColumnMetadata getColumn(String name)
name
- the name of the column to retrieve.
name
column if it exists, or
null
otherwise.public List<ColumnMetadata> getColumns()
SELECT * FROM thisTable
:
the first column is the partition key, next are the clustering
keys in their defined order, and then the rest of the
columns follow in alphabetic order.
public List<ColumnMetadata> getPrimaryKey()
public List<ColumnMetadata> getPartitionKey()
public List<ColumnMetadata> getClusteringKey()
public TableMetadata.Options getOptions()
public String exportAsString()
String
containing CQL queries representing this
table and the index on it.
In other words, this method returns the queries that would allow you to
recreate the schema of this table, along with the index defined on
columns of this table.
Note that the returned String is formatted to be human readable (for
some definition of human readable at least).
public String asCQLQuery()
exportAsString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |