Class TruncateStatement
- java.lang.Object
-
- org.apache.cassandra.cql3.CQLStatement.Raw
-
- org.apache.cassandra.cql3.statements.QualifiedStatement
-
- org.apache.cassandra.cql3.statements.TruncateStatement
-
- All Implemented Interfaces:
CQLStatement
public class TruncateStatement extends QualifiedStatement implements CQLStatement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.CQLStatement
CQLStatement.Raw, CQLStatement.SingleKeyspaceCqlStatement
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.cql3.CQLStatement.Raw
bindVariables
-
-
Constructor Summary
Constructors Constructor Description TruncateStatement(QualifiedName name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
authorize(ClientState state)
Perform any access verification necessary for the statement.ResultMessage
execute(QueryState state, QueryOptions options, Dispatcher.RequestTime requestTime)
Execute the statement and return the resulting result or null if there is no result.ResultMessage
executeLocally(QueryState state, QueryOptions options)
Variant of execute used for internal query against the system tables, and thus only query the local node.AuditLogContext
getAuditLogContext()
Provides the context needed for audit logging statements.TruncateStatement
prepare(ClientState state)
java.lang.String
toString()
void
validate(ClientState state)
Perform additional validation required by the statment.-
Methods inherited from class org.apache.cassandra.cql3.statements.QualifiedStatement
isFullyQualified, keyspace, name, setKeyspace, setKeyspace
-
Methods inherited from class org.apache.cassandra.cql3.CQLStatement.Raw
setBindVariables
-
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
-
-
-
-
Constructor Detail
-
TruncateStatement
public TruncateStatement(QualifiedName name)
-
-
Method Detail
-
prepare
public TruncateStatement prepare(ClientState state)
- Specified by:
prepare
in classCQLStatement.Raw
-
authorize
public void authorize(ClientState state) throws InvalidRequestException, UnauthorizedException
Description copied from interface:CQLStatement
Perform any access verification necessary for the statement.- Specified by:
authorize
in interfaceCQLStatement
- Parameters:
state
- the current client state- Throws:
InvalidRequestException
UnauthorizedException
-
validate
public void validate(ClientState state) throws InvalidRequestException
Description copied from interface:CQLStatement
Perform additional validation required by the statment. To be overriden by subclasses if needed.- Specified by:
validate
in interfaceCQLStatement
- Parameters:
state
- the current client state- Throws:
InvalidRequestException
-
execute
public ResultMessage execute(QueryState state, QueryOptions options, Dispatcher.RequestTime requestTime) throws InvalidRequestException, TruncateException
Description copied from interface:CQLStatement
Execute the statement and return the resulting result or null if there is no result.- Specified by:
execute
in interfaceCQLStatement
- Parameters:
state
- the current query stateoptions
- options for this query (consistency, variables, pageSize, ...)requestTime
- request enqueue / and start times;- Throws:
InvalidRequestException
TruncateException
-
executeLocally
public ResultMessage executeLocally(QueryState state, QueryOptions options)
Description copied from interface:CQLStatement
Variant of execute used for internal query against the system tables, and thus only query the local node.- Specified by:
executeLocally
in interfaceCQLStatement
- Parameters:
state
- the current query state
-
toString
public java.lang.String toString()
- Overrides:
toString
in classQualifiedStatement
-
getAuditLogContext
public AuditLogContext getAuditLogContext()
Description copied from interface:CQLStatement
Provides the context needed for audit logging statements.- Specified by:
getAuditLogContext
in interfaceCQLStatement
-
-