org.apache.cassandra.cql3.statements

## Class SchemaAlteringStatement

- java.lang.Object
- - org.apache.cassandra.cql3.statements.ParsedStatement
  - - org.apache.cassandra.cql3.statements.CFStatement
    - - org.apache.cassandra.cql3.statements.SchemaAlteringStatement

All Implemented Interfaces:
  CQLStatement

Direct Known Subclasses:
  AlterKeyspaceStatement, AlterTableStatement, AlterTypeStatement, CreateIndexStatement, CreateKeyspaceStatement, CreateTableStatement, CreateTriggerStatement, CreateTypeStatement, DropIndexStatement, DropKeyspaceStatement, DropTableStatement, DropTriggerStatement, DropTypeStatement

    public abstract class SchemaAlteringStatement
    extends CFStatement
    implements CQLStatement

Abstract class for statements that alter the schema.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.cassandra.cql3.statements.ParsedStatement

`ParsedStatement.Prepared`

### Field Summary

### Fields inherited from class org.apache.cassandra.cql3.statements.CFStatement

`cfName`

### Constructor Summary

Constructors
`protected` `SchemaAlteringStatement()`
`protected` `SchemaAlteringStatement(CFName name)`

### Method Summary

Methods
`abstract void` `announceMigration(boolean isLocalOnly)`
`abstract Event.SchemaChange` `changeEvent()`
`ResultMessage` `execute(QueryState state, QueryOptions options)` Execute the statement and return the resulting result or null if there is no result.
`ResultMessage` `executeInternal(QueryState state, QueryOptions options)` Variante of execute used for internal query against the system tables, and thus only query the local node.
`int` `getBoundTerms()` Returns the number of bound terms in this statement.
`ParsedStatement.Prepared` `prepare()`
`void` `prepareKeyspace(ClientState state)`

### Methods inherited from class org.apache.cassandra.cql3.statements.CFStatement

`columnFamily, keyspace, prepareKeyspace`

### Methods inherited from class org.apache.cassandra.cql3.statements.ParsedStatement

`getBoundVariables, setBoundVariables`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.cassandra.cql3.CQLStatement

`checkAccess, validate`

### Constructor Detail

#### SchemaAlteringStatement

    protected SchemaAlteringStatement()

#### SchemaAlteringStatement

    protected SchemaAlteringStatement(CFName name)

### Method Detail

#### getBoundTerms

    public int getBoundTerms()

Description copied from interface: `CQLStatement`
Returns the number of bound terms in this statement.

Specified by:
  `getBoundTerms` in interface `CQLStatement`

#### prepareKeyspace

    public void prepareKeyspace(ClientState state)
                         throws InvalidRequestException

Overrides:
  `prepareKeyspace` in class `CFStatement`
Throws:
  `InvalidRequestException`

#### prepare

    public ParsedStatement.Prepared prepare()

Specified by:
  `prepare` in class `ParsedStatement`

#### changeEvent

    public abstract Event.SchemaChange changeEvent()

#### announceMigration

    public abstract void announceMigration(boolean isLocalOnly)
                                    throws RequestValidationException

Throws:
  `RequestValidationException`

#### execute

    public ResultMessage execute(QueryState state,
                        QueryOptions options)
                          throws RequestValidationException

Description copied from interface: `CQLStatement`
Execute the statement and return the resulting result or null if there is no result.

Specified by:
  `execute` in interface `CQLStatement`
Parameters:
  `state` - the current query state
  `options` - options for this query (consistency, variables, pageSize, ...)
Throws:
  `RequestValidationException`

#### executeInternal

    public ResultMessage executeInternal(QueryState state,
                                QueryOptions options)

Description copied from interface: `CQLStatement`
Variante of execute used for internal query against the system tables, and thus only query the local node.

Specified by:
  `executeInternal` in interface `CQLStatement`
Parameters:
  `state` - the current query state