|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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()
Return a String containing CQL queries representing this
table and the index on it. |
List<ColumnMetadata> |
getClusteringKey()
Return 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()
The options of this table. |
List<ColumnMetadata> |
getPartitionKey()
Return the list of columns composing the partition key for this table. |
List<ColumnMetadata> |
getPrimaryKey()
Return 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 will be the partition key, next will be the clustering
keys in there defined order, and then will follow the rest of the
columns 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 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 defintion 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 |