org.apache.cassandra.cql3.statements
Class SelectStatement

java.lang.Object
  extended by org.apache.cassandra.cql3.statements.SelectStatement
All Implemented Interfaces:
CQLStatement

public class SelectStatement
extends java.lang.Object
implements CQLStatement

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


Nested Class Summary
static class SelectStatement.Parameters
           
static class SelectStatement.RawStatement
           
 
Field Summary
 CFDefinition cfDef
           
 SelectStatement.Parameters parameters
           
 
Constructor Summary
SelectStatement(CFDefinition cfDef, int boundTerms, SelectStatement.Parameters parameters)
           
 
Method Summary
 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 getBoundsTerms()
          Returns the number of bound terms in this statement.
 java.lang.String keyspace()
           
 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)
Method Detail

getBoundsTerms

public int getBoundsTerms()
Description copied from interface: CQLStatement
Returns the number of bound terms in this statement.

Specified by:
getBoundsTerms 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 © 2013 The Apache Software Foundation