Class CreateTableStatement
- java.lang.Object
-
- org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
-
- org.apache.cassandra.cql3.statements.schema.CreateTableStatement
-
- All Implemented Interfaces:
CQLStatement,CQLStatement.SingleKeyspaceCqlStatement,SchemaTransformation
public final class CreateTableStatement extends AlterSchemaStatement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateTableStatement.Raw-
Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.CQLStatement
CQLStatement.SingleKeyspaceCqlStatement
-
Nested classes/interfaces inherited from interface org.apache.cassandra.schema.SchemaTransformation
SchemaTransformation.SchemaTransformationResult
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
keyspaceName, state
-
-
Constructor Summary
Constructors Constructor Description CreateTableStatement(java.lang.String keyspaceName, java.lang.String tableName, java.util.Map<ColumnIdentifier,CQL3Type.Raw> rawColumns, java.util.Set<ColumnIdentifier> staticColumns, java.util.List<ColumnIdentifier> partitionKeyColumns, java.util.List<ColumnIdentifier> clusteringColumns, java.util.LinkedHashMap<ColumnIdentifier,java.lang.Boolean> clusteringOrder, TableAttributes attrs, boolean ifNotExists, boolean useCompactStorage)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Keyspacesapply(Keyspaces schema)Apply a statement transformation to a schema snapshot.voidauthorize(ClientState client)Perform any access verification necessary for the statement.TableMetadata.Builderbuilder(Types types)java.util.Set<java.lang.String>clientWarnings(Keyspaces.KeyspacesDiff diff)AuditLogContextgetAuditLogContext()Provides the context needed for audit logging statements.static TableMetadata.Builderparse(java.lang.String cql, java.lang.String keyspace)java.lang.StringtoString()voidvalidate(ClientState state)Perform additional validation required by the statment.-
Methods inherited from class org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
execute, execute, executeLocally, keyspace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.cql3.CQLStatement
getBindVariables, getFunctions, getPartitionKeyBindVariableIndexes, hasConditions
-
Methods inherited from interface org.apache.cassandra.schema.SchemaTransformation
fixedTimestampMicros
-
-
-
-
Constructor Detail
-
CreateTableStatement
public CreateTableStatement(java.lang.String keyspaceName, java.lang.String tableName, java.util.Map<ColumnIdentifier,CQL3Type.Raw> rawColumns, java.util.Set<ColumnIdentifier> staticColumns, java.util.List<ColumnIdentifier> partitionKeyColumns, java.util.List<ColumnIdentifier> clusteringColumns, java.util.LinkedHashMap<ColumnIdentifier,java.lang.Boolean> clusteringOrder, TableAttributes attrs, boolean ifNotExists, boolean useCompactStorage)
-
-
Method Detail
-
apply
public Keyspaces apply(Keyspaces schema)
Description copied from interface:SchemaTransformationApply a statement transformation to a schema snapshot.Implementing methods should be side-effect free (outside of throwing exceptions if the transformation cannot be successfully applied to the provided schema).
- Parameters:
schema- Keyspaces to base the transformation on- Returns:
- Keyspaces transformed by the statement
-
validate
public void validate(ClientState state)
Description copied from interface:CQLStatementPerform additional validation required by the statment. To be overriden by subclasses if needed.- Specified by:
validatein interfaceCQLStatement- Overrides:
validatein classAlterSchemaStatement- Parameters:
state- the current client state
-
authorize
public void authorize(ClientState client)
Description copied from interface:CQLStatementPerform any access verification necessary for the statement.- Parameters:
client- the current client state
-
getAuditLogContext
public AuditLogContext getAuditLogContext()
Description copied from interface:CQLStatementProvides the context needed for audit logging statements.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public TableMetadata.Builder builder(Types types)
-
clientWarnings
public java.util.Set<java.lang.String> clientWarnings(Keyspaces.KeyspacesDiff diff)
-
parse
public static TableMetadata.Builder parse(java.lang.String cql, java.lang.String keyspace)
-
-