public class SelectStatement extends java.lang.Object implements CQLStatement
Modifier and Type | Class and Description |
---|---|
static class |
SelectStatement.Parameters |
static class |
SelectStatement.RawStatement |
Modifier and Type | Field and Description |
---|---|
CFMetaData |
cfm |
SelectStatement.Parameters |
parameters |
static java.lang.String |
REQUIRES_ALLOW_FILTERING_MESSAGE |
Constructor and Description |
---|
SelectStatement(CFMetaData cfm,
int boundTerms,
SelectStatement.Parameters parameters,
Selection selection,
StatementRestrictions restrictions,
boolean isReversed,
java.util.Comparator<java.util.List<java.nio.ByteBuffer>> orderingComparator,
Term limit) |
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(QueryState state,
QueryOptions options)
Execute the statement and return the resulting result or null if there is no result.
|
ResultMessage.Rows |
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.
|
static java.nio.ByteBuffer[] |
getComponents(CFMetaData cfm,
DecoratedKey dk) |
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
|
DataLimits |
getLimit(QueryOptions options)
May be used by custom QueryHandler implementations
|
ReadQuery |
getQuery(QueryOptions options,
int nowInSec) |
StatementRestrictions |
getRestrictions()
May be used by custom QueryHandler implementations
|
ResultSet.ResultMetadata |
getResultMetadata() |
RowFilter |
getRowFilter(QueryOptions options)
May be used by custom QueryHandler implementations
|
Selection |
getSelection()
May be used by custom QueryHandler implementations
|
java.lang.String |
keyspace() |
ResultSet |
process(PartitionIterator partitions,
int nowInSec) |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
public static final java.lang.String REQUIRES_ALLOW_FILTERING_MESSAGE
public final CFMetaData cfm
public final SelectStatement.Parameters parameters
public SelectStatement(CFMetaData cfm, int boundTerms, SelectStatement.Parameters parameters, Selection selection, StatementRestrictions restrictions, boolean isReversed, java.util.Comparator<java.util.List<java.nio.ByteBuffer>> orderingComparator, Term limit)
public java.lang.Iterable<Function> getFunctions()
CQLStatement
getFunctions
in interface CQLStatement
public ResultSet.ResultMetadata getResultMetadata()
public int getBoundTerms()
CQLStatement
getBoundTerms
in interface CQLStatement
public void checkAccess(ClientState state) throws InvalidRequestException, UnauthorizedException
CQLStatement
checkAccess
in interface CQLStatement
state
- the current client stateInvalidRequestException
UnauthorizedException
public void validate(ClientState state) throws InvalidRequestException
CQLStatement
validate
in interface CQLStatement
state
- the current client stateInvalidRequestException
public ResultMessage.Rows execute(QueryState state, QueryOptions options) throws RequestExecutionException, RequestValidationException
CQLStatement
execute
in interface CQLStatement
state
- the current query stateoptions
- options for this query (consistency, variables, pageSize, ...)RequestExecutionException
RequestValidationException
public ReadQuery getQuery(QueryOptions options, int nowInSec) throws RequestValidationException
RequestValidationException
public ResultMessage.Rows executeInternal(QueryState state, QueryOptions options) throws RequestExecutionException, RequestValidationException
CQLStatement
executeInternal
in interface CQLStatement
state
- the current query stateRequestExecutionException
RequestValidationException
public ResultSet process(PartitionIterator partitions, int nowInSec) throws InvalidRequestException
InvalidRequestException
public java.lang.String keyspace()
public java.lang.String columnFamily()
public Selection getSelection()
public StatementRestrictions getRestrictions()
public DataLimits getLimit(QueryOptions options) throws InvalidRequestException
InvalidRequestException
public RowFilter getRowFilter(QueryOptions options) throws InvalidRequestException
InvalidRequestException
public static java.nio.ByteBuffer[] getComponents(CFMetaData cfm, DecoratedKey dk)
Copyright © 2015 The Apache Software Foundation