public interface CassandraAdminOperations extends CassandraOperations
Modifier and Type | Method and Description |
---|---|
void |
createTable(boolean ifNotExists,
CqlIdentifier tableName,
Class<?> entityClass,
Map<String,Object> optionsByName)
Create a table with the name given and fields corresponding to the given class.
|
void |
dropTable(CqlIdentifier tableName)
Drops the named table.
|
void |
dropUserType(CqlIdentifier typeName)
Drops a user type.
|
com.datastax.driver.core.KeyspaceMetadata |
getKeyspaceMetadata()
Returns
KeyspaceMetadata for the current keyspace. |
Optional<com.datastax.driver.core.TableMetadata> |
getTableMetadata(String keyspace,
CqlIdentifier tableName)
Lookup
TableMetadata . |
batchOps, count, delete, delete, delete, deleteById, exists, getConverter, getCqlOperations, getTableName, insert, insert, select, select, select, selectOne, selectOne, selectOne, selectOneById, slice, slice, stream, stream, stream, truncate, update, update, update
void createTable(boolean ifNotExists, CqlIdentifier tableName, Class<?> entityClass, Map<String,Object> optionsByName)
ifNotExists
is true, this is a no-op and false is returned. If the table
doesn't exist, parameter ifNotExists
is ignored, the table is created and true is returned.ifNotExists
- If true, will only create the table if it doesn't exist, else the create operation will be
ignored and the method will return false.tableName
- The name of the table.entityClass
- The class whose fields determine the columns created.optionsByName
- Table options, given by the string option name and the appropriate option value.void dropTable(CqlIdentifier tableName)
tableName
- The name of the table.Optional<com.datastax.driver.core.TableMetadata> getTableMetadata(String keyspace, CqlIdentifier tableName)
TableMetadata
.keyspace
- must not be empty or null.tableName
- must not be null.TableMetadata
or null.com.datastax.driver.core.KeyspaceMetadata getKeyspaceMetadata()
KeyspaceMetadata
for the current keyspace.KeyspaceMetadata
for the current keyspace.void dropUserType(CqlIdentifier typeName)
typeName
- must not be null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.