org.apache.cassandra.cql3.statements

## Class SelectStatement

- java.lang.Object
- - org.apache.cassandra.cql3.statements.SelectStatement

- All Implemented Interfaces:
    CQLStatement, MeasurableForPreparedCache

      public class SelectStatement
      extends java.lang.Object
      implements CQLStatement, MeasurableForPreparedCache

  Encapsulates a completely parsed SELECT query, including the target column family, expression, result count, and ordering clause.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SelectStatement.Parameters`
    `static class` | `SelectStatement.RawStatement`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `CFDefinition` | `cfDef`
    `SelectStatement.Parameters` | `parameters`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SelectStatement(CFDefinition cfDef, int boundTerms, SelectStatement.Parameters parameters, Selection selection)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkAccess(ClientState state)` Perform any access verification necessary for the statement.
    `java.lang.String` | `columnFamily()`
    `ResultMessage.Rows` | `execute(ConsistencyLevel cl, QueryState state, java.util.List<java.nio.ByteBuffer> variables)` Execute the statement and return the resulting result or null if there is no result.
    `ResultMessage.Rows` | `executeInternal(QueryState state)` 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.
    `java.lang.String` | `keyspace()`
    `long` | `measureForPreparedCache(org.github.jamm.MemoryMeter meter)`
    `ResultSet` | `process(java.util.List<Row> rows)`
    `void` | `validate(ClientState state)` Perform additional validation required by the statment.

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

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

- - ### Field Detail

    - #### cfDef

          public final CFDefinition cfDef

    - #### parameters

          public final SelectStatement.Parameters parameters

  - ### Constructor Detail

    - #### SelectStatement

          public SelectStatement(CFDefinition cfDef,
                         int boundTerms,
                         SelectStatement.Parameters parameters,
                         Selection selection)

  - ### Method Detail

    - #### measureForPreparedCache

          public long measureForPreparedCache(org.github.jamm.MemoryMeter meter)

      Specified by:
        `measureForPreparedCache` in interface `MeasurableForPreparedCache`

    - #### getBoundTerms

          public int getBoundTerms()

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

    - #### 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.Rows execute(ConsistencyLevel cl,
                                   QueryState state,
                                   java.util.List<java.nio.ByteBuffer> variables)
                                     throws RequestExecutionException,
                                            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`
        `state` - the current query state
        `variables` - the values for bounded variables. The implementation can assume that each bound term have a corresponding value.
      Throws:
        `RequestExecutionException`
        `RequestValidationException`

    - #### executeInternal

          public ResultMessage.Rows executeInternal(QueryState state)
                                             throws RequestExecutionException,
                                                    RequestValidationException

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

    - #### process

          public ResultSet process(java.util.List<Row> rows)
                            throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### keyspace

          public java.lang.String keyspace()

    - #### columnFamily

          public java.lang.String columnFamily()

Copyright © 2014 The Apache Software Foundation