public class CreateKeyspaceStatement extends SchemaAlteringStatement
CREATE KEYSPACE
statement parsed from a CQL query.ParsedStatement.Prepared
cfName
Constructor and Description |
---|
CreateKeyspaceStatement(java.lang.String name,
KSPropDefs attrs)
Creates a new
CreateKeyspaceStatement instance for a given
keyspace name and keyword arguments. |
Modifier and Type | Method and Description |
---|---|
void |
announceMigration() |
ResultMessage.SchemaChange.Change |
changeType() |
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement.
|
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, prepare, prepareKeyspace
columnFamily
getBoundTerms, setBoundTerms
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBoundTerms
public CreateKeyspaceStatement(java.lang.String name, KSPropDefs attrs)
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 CFStatement
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
CQLStatement
state
- the current client stateUnauthorizedException
InvalidRequestException
public 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.validate
in interface CQLStatement
validate
in class SchemaAlteringStatement
state
- the current client stateInvalidRequestException
- if arguments are missing or unacceptableRequestValidationException
public void announceMigration() throws RequestValidationException
announceMigration
in class SchemaAlteringStatement
RequestValidationException
public ResultMessage.SchemaChange.Change changeType()
changeType
in class SchemaAlteringStatement
Copyright © 2014 The Apache Software Foundation