org.apache.cassandra.cql3.statements

## Class TruncateStatement

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

- All Implemented Interfaces:
    CQLStatement

      public class TruncateStatement
      extends CFStatement
      implements CQLStatement

- - ### 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
    Constructor and Description
    `TruncateStatement(CFName name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkAccess(ClientState state)` Perform any access verification necessary for the statement.
    `ResultMessage` | `execute(QueryState state, QueryOptions options, long queryStartNanoTime)` 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.
    `ParsedStatement.Prepared` | `prepare(ClientState clientState)`
    `void` | `validate(ClientState state)` Perform additional validation required by the statment.

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

      `columnFamily, keyspace, prepareKeyspace, prepareKeyspace`

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

      `getBoundVariables, getFunctions, setBoundVariables, 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

      `getFunctions`

- - ### Constructor Detail

    - #### TruncateStatement

          public TruncateStatement(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`

    - #### prepare

          public ParsedStatement.Prepared prepare(ClientState clientState)
                                           throws InvalidRequestException

      Specified by:
        `prepare` in class `ParsedStatement`
      Throws:
        `InvalidRequestException`

    - #### checkAccess

          public void checkAccess(ClientState state)
                           throws InvalidRequestException,
                                  UnauthorizedException

      Description copied from interface: `CQLStatement`
      Perform any access verification necessary for the statement.
      Specified by:
        `checkAccess` in interface `CQLStatement`
      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 interface `CQLStatement`
      Parameters:
        `state` - the current client state
      Throws:
        `InvalidRequestException`

    - #### execute

          public ResultMessage execute(QueryState state,
                                       QueryOptions options,
                                       long queryStartNanoTime)
                                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 interface `CQLStatement`
      Parameters:
        `state` - the current query state
        `options` - options for this query (consistency, variables, pageSize, ...)
        `queryStartNanoTime` - the timestamp returned by System.nanoTime() when this statement was received
      Throws:
        `InvalidRequestException`
        `TruncateException`

    - #### executeInternal

          public ResultMessage executeInternal(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:
        `executeInternal` in interface `CQLStatement`
      Parameters:
        `state` - the current query state

Copyright © 2018 The Apache Software Foundation