public abstract class SchemaAlteringStatement extends CFStatement implements CQLStatement
ParsedStatement.Prepared
cfName
Modifier | Constructor and Description |
---|---|
protected |
SchemaAlteringStatement() |
protected |
SchemaAlteringStatement(CFName name) |
Modifier and Type | Method and Description |
---|---|
protected abstract Event.SchemaChange |
announceMigration(QueryState queryState,
boolean isLocalOnly)
Announces the migration to other nodes in the cluster.
|
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)
Variant 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.
|
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.
|
ParsedStatement.Prepared |
prepare() |
void |
prepareKeyspace(ClientState state) |
columnFamily, keyspace, prepareKeyspace
getBoundVariables, getFunctions, setBoundVariables, setBoundVariables
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAccess, getFunctions, validate
protected SchemaAlteringStatement()
protected SchemaAlteringStatement(CFName name)
public int getBoundTerms()
CQLStatement
getBoundTerms
in interface CQLStatement
public void prepareKeyspace(ClientState state) throws InvalidRequestException
prepareKeyspace
in class CFStatement
InvalidRequestException
public ParsedStatement.Prepared prepare()
prepare
in class ParsedStatement
protected void grantPermissionsToCreator(QueryState state)
protected abstract Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly) throws RequestValidationException
null
if no schema change
has occurred (when IF NOT EXISTS is used, for example)RequestValidationException
public ResultMessage execute(QueryState state, QueryOptions options) throws RequestValidationException
CQLStatement
execute
in interface CQLStatement
state
- the current query stateoptions
- options for this query (consistency, variables, pageSize, ...)RequestValidationException
public ResultMessage executeInternal(QueryState state, QueryOptions options)
CQLStatement
executeInternal
in interface CQLStatement
state
- the current query stateCopyright © 2017 The Apache Software Foundation