public class CreateTableStatement extends SchemaAlteringStatement
CREATE TABLE
parsed from a CQL query statement.Modifier and Type | Class and Description |
---|---|
static class |
CreateTableStatement.RawStatement |
ParsedStatement.Prepared
Modifier and Type | Field and Description |
---|---|
CellNameType |
comparator |
cfName
Constructor and Description |
---|
CreateTableStatement(CFName name,
CFPropDefs properties,
boolean ifNotExists,
java.util.Set<ColumnIdentifier> staticColumns,
java.util.UUID id) |
Modifier and Type | Method and Description |
---|---|
boolean |
announceMigration(boolean isLocalOnly)
Announces the migration to other nodes in the cluster.
|
void |
applyPropertiesTo(CFMetaData cfmd) |
Event.SchemaChange |
changeEvent() |
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement.
|
CFMetaData |
getCFMetaData()
Returns a CFMetaData instance based on the parameters parsed from this
CREATE statement, or defaults where applicable. |
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.
|
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
execute, executeInternal, getBoundTerms, prepare, prepareKeyspace
columnFamily, keyspace, prepareKeyspace
getBoundVariables, getFunctions, setBoundVariables
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFunctions
public CellNameType comparator
public CreateTableStatement(CFName name, CFPropDefs properties, boolean ifNotExists, java.util.Set<ColumnIdentifier> staticColumns, java.util.UUID id)
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
CQLStatement
state
- the current client stateUnauthorizedException
InvalidRequestException
public void validate(ClientState state)
CQLStatement
state
- the current client statepublic boolean announceMigration(boolean isLocalOnly) throws RequestValidationException
SchemaAlteringStatement
announceMigration
in class SchemaAlteringStatement
RequestValidationException
public Event.SchemaChange changeEvent()
changeEvent
in class SchemaAlteringStatement
protected void grantPermissionsToCreator(QueryState state)
SchemaAlteringStatement
grantPermissionsToCreator
in class SchemaAlteringStatement
public CFMetaData getCFMetaData() throws RequestValidationException
CREATE
statement, or defaults where applicable.InvalidRequestException
- on failure to validate parsed parametersRequestValidationException
public void applyPropertiesTo(CFMetaData cfmd) throws RequestValidationException
RequestValidationException
Copyright © 2017 The Apache Software Foundation