Class AlterTableStatement
- java.lang.Object
-
- org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
-
- org.apache.cassandra.cql3.statements.schema.AlterTableStatement
-
- All Implemented Interfaces:
CQLStatement
,CQLStatement.SingleKeyspaceCqlStatement
,SchemaTransformation
- Direct Known Subclasses:
AlterTableStatement.AlterColumn
,AlterTableStatement.MaskColumn
public abstract class AlterTableStatement extends AlterSchemaStatement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AlterTableStatement.AlterColumn
ALTER TABLE [IF EXISTS] <table> ALTER <column> TYPE <newtype>;
No longer supported.static class
AlterTableStatement.MaskColumn
ALTER TABLE [IF EXISTS] <table> ALTER [IF EXISTS] <column> ( MASKED WITH <newMask> | DROP MASKED )
static class
AlterTableStatement.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 Modifier and Type Field Description protected ClientState
state
protected java.lang.String
tableName
-
Fields inherited from class org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
keyspaceName
-
-
Constructor Summary
Constructors Constructor Description AlterTableStatement(java.lang.String keyspaceName, java.lang.String tableName, boolean ifExists)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Keyspaces
apply(Keyspaces schema)
Apply a statement transformation to a schema snapshot.void
authorize(ClientState client)
Perform any access verification necessary for the statement.AuditLogContext
getAuditLogContext()
Provides the context needed for audit logging statements.java.lang.String
toString()
void
validate(ClientState state)
Perform additional validation required by the statment.-
Methods inherited from class org.apache.cassandra.cql3.statements.schema.AlterSchemaStatement
execute, execute, executeLocally, keyspace, validateDefaultTimeToLive
-
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
-
-
-
-
Field Detail
-
tableName
protected final java.lang.String tableName
-
state
protected ClientState state
-
-
Method Detail
-
validate
public void validate(ClientState state)
Description copied from interface:CQLStatement
Perform additional validation required by the statment. To be overriden by subclasses if needed.- Specified by:
validate
in interfaceCQLStatement
- Overrides:
validate
in classAlterSchemaStatement
- Parameters:
state
- the current client state
-
apply
public Keyspaces apply(Keyspaces schema)
Description copied from interface:SchemaTransformation
Apply 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
-
authorize
public void authorize(ClientState client)
Description copied from interface:CQLStatement
Perform any access verification necessary for the statement.- Parameters:
client
- the current client state
-
getAuditLogContext
public AuditLogContext getAuditLogContext()
Description copied from interface:CQLStatement
Provides the context needed for audit logging statements.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-