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
cfName
Constructor and Description |
---|
CreateTableStatement(CFName name,
TableParams params,
boolean ifNotExists,
java.util.Set<ColumnIdentifier> staticColumns,
java.util.UUID id) |
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.
|
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.
|
CFMetaData.Builder |
metadataBuilder() |
TableParams |
params() |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
execute, executeInternal, getBoundTerms, prepare, prepareKeyspace
columnFamily, keyspace, prepareKeyspace
getBoundVariables, getFunctions, setBoundVariables, setBoundVariables
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFunctions
public CreateTableStatement(CFName name, TableParams params, 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 Event.SchemaChange announceMigration(boolean isLocalOnly) throws RequestValidationException
SchemaAlteringStatement
announceMigration
in class SchemaAlteringStatement
null
if no schema change
has occurred (when IF NOT EXISTS is used, for example)RequestValidationException
protected void grantPermissionsToCreator(QueryState state)
SchemaAlteringStatement
grantPermissionsToCreator
in class SchemaAlteringStatement
public CFMetaData.Builder metadataBuilder()
public CFMetaData getCFMetaData()
CREATE
statement, or defaults where applicable.InvalidRequestException
- on failure to validate parsed parameterspublic TableParams params()
Copyright © 2016 The Apache Software Foundation