org.apache.cassandra.cql3

## Interface CQLStatement

All Known Implementing Classes:
  AlterKeyspaceStatement, AlterRoleStatement, AlterTableStatement, AlterTypeStatement, AlterViewStatement, AuthenticationStatement, AuthorizationStatement, BatchStatement, CreateAggregateStatement, CreateFunctionStatement, CreateIndexStatement, CreateKeyspaceStatement, CreateRoleStatement, CreateTableStatement, CreateTriggerStatement, CreateTypeStatement, CreateViewStatement, DeleteStatement, DropAggregateStatement, DropFunctionStatement, DropIndexStatement, DropKeyspaceStatement, DropRoleStatement, DropTableStatement, DropTriggerStatement, DropTypeStatement, DropViewStatement, GrantPermissionsStatement, GrantRoleStatement, ListPermissionsStatement, ListRolesStatement, ListUsersStatement, ModificationStatement, PermissionsManagementStatement, RevokePermissionsStatement, RevokeRoleStatement, RoleManagementStatement, SchemaAlteringStatement, SelectStatement, TruncateStatement, UpdateStatement, UseStatement

    public interface CQLStatement

### Method Summary

All Methods Instance Methods Abstract Methods
`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.
`java.lang.Iterable<Function>` `getFunctions()` Return an Iterable over all of the functions (both native and user-defined) used by any component of the statement
`void` `validate(ClientState state)` Perform additional validation required by the statment.

### Method Detail

#### getBoundTerms

    int getBoundTerms()

Returns the number of bound terms in this statement.

#### checkAccess

    void checkAccess(ClientState state)
              throws UnauthorizedException,
                     InvalidRequestException

Perform any access verification necessary for the statement.

Parameters:
  `state` - the current client state
Throws:
  `UnauthorizedException`
  `InvalidRequestException`

#### validate

    void validate(ClientState state)
           throws RequestValidationException

Perform additional validation required by the statment. To be overriden by subclasses if needed.

Parameters:
  `state` - the current client state
Throws:
  `RequestValidationException`

#### execute

    ResultMessage execute(QueryState state,
                          QueryOptions options,
                          long queryStartNanoTime)
                   throws RequestValidationException,
                          RequestExecutionException

Execute the statement and return the resulting result or null if there is no result.

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:
  `RequestValidationException`
  `RequestExecutionException`

#### executeInternal

    ResultMessage executeInternal(QueryState state,
                                  QueryOptions options)
                           throws RequestValidationException,
                                  RequestExecutionException

Variant of execute used for internal query against the system tables, and thus only query the local node.

Parameters:
  `state` - the current query state
Throws:
  `RequestValidationException`
  `RequestExecutionException`

#### getFunctions

    java.lang.Iterable<Function> getFunctions()

Return an Iterable over all of the functions (both native and user-defined) used by any component of the statement

Returns:
  functions all functions found (may contain duplicates)