org.apache.cassandra.cql3.statements
Class SelectStatement
java.lang.Object
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.
Method Summary |
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement. |
java.lang.String |
columnFamily()
|
org.apache.cassandra.thrift.CqlResult |
execute(ClientState state,
java.util.List<java.nio.ByteBuffer> variables)
Execute the statement and return the resulting result or null if there is no result. |
int |
getBoundsTerms()
Returns the number of bound terms in this statement. |
java.lang.String |
keyspace()
|
java.util.List<org.apache.cassandra.thrift.CqlRow> |
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 |
cfDef
public final CFDefinition cfDef
parameters
public final SelectStatement.Parameters parameters
SelectStatement
public SelectStatement(CFDefinition cfDef,
int boundTerms,
SelectStatement.Parameters parameters)
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 org.apache.cassandra.thrift.InvalidRequestException
- 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:
org.apache.cassandra.thrift.InvalidRequestException
validate
public void validate(ClientState state)
throws org.apache.cassandra.thrift.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:
org.apache.cassandra.thrift.InvalidRequestException
execute
public org.apache.cassandra.thrift.CqlResult execute(ClientState state,
java.util.List<java.nio.ByteBuffer> variables)
throws org.apache.cassandra.thrift.InvalidRequestException,
org.apache.cassandra.thrift.UnavailableException,
org.apache.cassandra.thrift.TimedOutException
- 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 client statevariables
- the values for bounded variables. The implementation
can assume that each bound term have a corresponding value.
- Throws:
org.apache.cassandra.thrift.InvalidRequestException
org.apache.cassandra.thrift.UnavailableException
org.apache.cassandra.thrift.TimedOutException
process
public java.util.List<org.apache.cassandra.thrift.CqlRow> process(java.util.List<Row> rows)
throws org.apache.cassandra.thrift.InvalidRequestException
- Throws:
org.apache.cassandra.thrift.InvalidRequestException
keyspace
public java.lang.String keyspace()
columnFamily
public java.lang.String columnFamily()
Copyright © 2012 The Apache Software Foundation