public class BatchStatement extends java.lang.Object implements CQLStatement
BATCH statement parsed from a CQL query.| Modifier and Type | Class and Description |
|---|---|
static class |
BatchStatement.Parsed |
static class |
BatchStatement.Type |
| Modifier and Type | Field and Description |
|---|---|
BatchStatement.Type |
type |
| Constructor and Description |
|---|
BatchStatement(int boundTerms,
BatchStatement.Type type,
java.util.List<ModificationStatement> statements,
Attributes attrs)
Creates a new BatchStatement from a list of statements and a
Thrift consistency level.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkAccess(ClientState state)
Perform any access verification necessary for the statement.
|
ResultMessage |
execute(QueryState queryState,
BatchQueryOptions options,
long queryStartNanoTime) |
ResultMessage |
execute(QueryState queryState,
QueryOptions options,
long queryStartNanoTime)
Execute the statement and return the resulting result or null if there is no result.
|
ResultMessage |
executeInternal(QueryState queryState,
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.
|
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
|
java.util.List<ModificationStatement> |
getStatements() |
java.lang.String |
toString() |
void |
validate() |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
public final BatchStatement.Type type
public BatchStatement(int boundTerms,
BatchStatement.Type type,
java.util.List<ModificationStatement> statements,
Attributes attrs)
type - type of the batchstatements - a list of UpdateStatementsattrs - additional attributes for statement (CL, timestamp, timeToLive)public java.lang.Iterable<Function> getFunctions()
CQLStatementgetFunctions in interface CQLStatementpublic int getBoundTerms()
CQLStatementgetBoundTerms in interface CQLStatementpublic void checkAccess(ClientState state) throws InvalidRequestException, UnauthorizedException
CQLStatementcheckAccess in interface CQLStatementstate - the current client stateInvalidRequestExceptionUnauthorizedExceptionpublic void validate()
throws InvalidRequestException
InvalidRequestExceptionpublic void validate(ClientState state) throws InvalidRequestException
CQLStatementvalidate in interface CQLStatementstate - the current client stateInvalidRequestExceptionpublic java.util.List<ModificationStatement> getStatements()
public ResultMessage execute(QueryState queryState, QueryOptions options, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException
CQLStatementexecute in interface CQLStatementqueryState - the current query stateoptions - options for this query (consistency, variables, pageSize, ...)queryStartNanoTime - the timestamp returned by System.nanoTime() when this statement was receivedRequestExecutionExceptionRequestValidationExceptionpublic ResultMessage execute(QueryState queryState, BatchQueryOptions options, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException
public ResultMessage executeInternal(QueryState queryState, QueryOptions options) throws RequestValidationException, RequestExecutionException
CQLStatementexecuteInternal in interface CQLStatementqueryState - the current query stateRequestValidationExceptionRequestExecutionExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 The Apache Software Foundation