public class CreateKeyspaceStatement extends SchemaAlteringStatement
CREATE KEYSPACE statement parsed from a CQL query.ParsedStatement.PreparedcfName| Constructor and Description |
|---|
CreateKeyspaceStatement(java.lang.String name,
KeyspaceAttributes attrs,
boolean ifNotExists)
Creates a new
CreateKeyspaceStatement instance for a given
keyspace name and keyword arguments. |
| Modifier and Type | Method and Description |
|---|---|
Event.SchemaChange |
announceMigration(boolean isLocalOnly)
Announces the migration to other nodes in the cluster.
|
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement.
|
protected void |
grantPermissionsToCreator(QueryState state)
Schema alteration may result in a new database object (keyspace, table, role, function) being created capable of
having permissions GRANTed on it.
|
java.lang.String |
keyspace() |
void |
validate(ClientState state)
The
CqlParser only goes as far as extracting the keyword arguments
from these statements, so this method is responsible for processing and
validating. |
execute, executeInternal, getBoundTerms, prepare, prepareKeyspacecolumnFamily, prepareKeyspacegetBoundVariables, getFunctions, setBoundVariables, setBoundVariablesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFunctionspublic CreateKeyspaceStatement(java.lang.String name,
KeyspaceAttributes attrs,
boolean ifNotExists)
CreateKeyspaceStatement instance for a given
keyspace name and keyword arguments.name - the name of the keyspace to createattrs - map of the raw keyword arguments that followed the WITH keyword.public java.lang.String keyspace()
keyspace in class CFStatementpublic void checkAccess(ClientState state) throws UnauthorizedException
CQLStatementstate - the current client stateUnauthorizedExceptionpublic void validate(ClientState state) throws RequestValidationException
CqlParser only goes as far as extracting the keyword arguments
from these statements, so this method is responsible for processing and
validating.state - the current client stateInvalidRequestException - if arguments are missing or unacceptableRequestValidationExceptionpublic Event.SchemaChange announceMigration(boolean isLocalOnly) throws RequestValidationException
SchemaAlteringStatementannounceMigration in class SchemaAlteringStatementnull if no schema change
has occurred (when IF NOT EXISTS is used, for example)RequestValidationExceptionprotected void grantPermissionsToCreator(QueryState state)
SchemaAlteringStatementgrantPermissionsToCreator in class SchemaAlteringStatementCopyright © 2016 The Apache Software Foundation