public class QueryProcessor extends java.lang.Object implements QueryHandler
Modifier and Type | Field and Description |
---|---|
static SemanticVersion |
CQL_VERSION |
static QueryProcessor |
instance |
Modifier and Type | Method and Description |
---|---|
static UntypedResultSet |
executeInternal(java.lang.String query,
java.lang.Object... values) |
static UntypedResultSet |
executeInternalWithPaging(java.lang.String query,
int pageSize,
java.lang.Object... values) |
static UntypedResultSet |
executeOnceInternal(java.lang.String query,
java.lang.Object... values)
Same than executeInternal, but to use for queries we know are only executed once so that the
created statement object is not cached.
|
ParsedStatement.Prepared |
getPrepared(MD5Digest id) |
CQLStatement |
getPreparedForThrift(java.lang.Integer id) |
static ParsedStatement.Prepared |
getStatement(java.lang.String queryStr,
ClientState clientState) |
static ParsedStatement |
parseStatement(java.lang.String queryStr) |
static ParsedStatement.Prepared |
parseStatement(java.lang.String queryStr,
QueryState queryState) |
static ResultMessage.Prepared |
prepare(java.lang.String queryString,
ClientState clientState,
boolean forThrift) |
ResultMessage.Prepared |
prepare(java.lang.String queryString,
QueryState queryState) |
static UntypedResultSet |
process(java.lang.String query,
ConsistencyLevel cl) |
static ResultMessage |
process(java.lang.String queryString,
ConsistencyLevel cl,
QueryState queryState) |
ResultMessage |
process(java.lang.String queryString,
QueryState queryState,
QueryOptions options) |
ResultMessage |
processBatch(BatchStatement batch,
QueryState queryState,
BatchQueryOptions options) |
ResultMessage |
processPrepared(CQLStatement statement,
QueryState queryState,
QueryOptions options) |
static ResultMessage |
processStatement(CQLStatement statement,
QueryState queryState,
QueryOptions options) |
static UntypedResultSet |
resultify(java.lang.String query,
java.util.List<Row> rows) |
static UntypedResultSet |
resultify(java.lang.String query,
Row row) |
static void |
validateCellName(CellName name,
CellNameType type) |
static void |
validateCellNames(java.lang.Iterable<CellName> cellNames,
CellNameType type) |
static void |
validateComposite(Composite name,
CType type) |
static void |
validateKey(java.nio.ByteBuffer key) |
public static final SemanticVersion CQL_VERSION
public static final QueryProcessor instance
public ParsedStatement.Prepared getPrepared(MD5Digest id)
getPrepared
in interface QueryHandler
public CQLStatement getPreparedForThrift(java.lang.Integer id)
getPreparedForThrift
in interface QueryHandler
public static void validateKey(java.nio.ByteBuffer key) throws InvalidRequestException
InvalidRequestException
public static void validateCellNames(java.lang.Iterable<CellName> cellNames, CellNameType type) throws InvalidRequestException
InvalidRequestException
public static void validateCellName(CellName name, CellNameType type) throws InvalidRequestException
InvalidRequestException
public static void validateComposite(Composite name, CType type) throws InvalidRequestException
InvalidRequestException
public static ResultMessage processStatement(CQLStatement statement, QueryState queryState, QueryOptions options) throws RequestExecutionException, RequestValidationException
public static ResultMessage process(java.lang.String queryString, ConsistencyLevel cl, QueryState queryState) throws RequestExecutionException, RequestValidationException
public ResultMessage process(java.lang.String queryString, QueryState queryState, QueryOptions options) throws RequestExecutionException, RequestValidationException
process
in interface QueryHandler
RequestExecutionException
RequestValidationException
public static ParsedStatement.Prepared parseStatement(java.lang.String queryStr, QueryState queryState) throws RequestValidationException
RequestValidationException
public static UntypedResultSet process(java.lang.String query, ConsistencyLevel cl) throws RequestExecutionException
RequestExecutionException
public static UntypedResultSet executeInternal(java.lang.String query, java.lang.Object... values)
public static UntypedResultSet executeInternalWithPaging(java.lang.String query, int pageSize, java.lang.Object... values)
public static UntypedResultSet executeOnceInternal(java.lang.String query, java.lang.Object... values)
public static UntypedResultSet resultify(java.lang.String query, Row row)
public static UntypedResultSet resultify(java.lang.String query, java.util.List<Row> rows)
public ResultMessage.Prepared prepare(java.lang.String queryString, QueryState queryState) throws RequestValidationException
prepare
in interface QueryHandler
RequestValidationException
public static ResultMessage.Prepared prepare(java.lang.String queryString, ClientState clientState, boolean forThrift) throws RequestValidationException
RequestValidationException
public ResultMessage processPrepared(CQLStatement statement, QueryState queryState, QueryOptions options) throws RequestExecutionException, RequestValidationException
processPrepared
in interface QueryHandler
RequestExecutionException
RequestValidationException
public ResultMessage processBatch(BatchStatement batch, QueryState queryState, BatchQueryOptions options) throws RequestExecutionException, RequestValidationException
processBatch
in interface QueryHandler
RequestExecutionException
RequestValidationException
public static ParsedStatement.Prepared getStatement(java.lang.String queryStr, ClientState clientState) throws RequestValidationException
RequestValidationException
public static ParsedStatement parseStatement(java.lang.String queryStr) throws SyntaxException
SyntaxException
Copyright © 2014 The Apache Software Foundation