public abstract class ModificationStatement extends java.lang.Object implements CQLStatement.SingleKeyspaceCqlStatement
| Modifier and Type | Class and Description |
|---|---|
static class |
ModificationStatement.Parsed |
CQLStatement.Raw, CQLStatement.SingleKeyspaceCqlStatement| Modifier and Type | Field and Description |
|---|---|
protected VariableSpecifications |
bindVariables |
static java.lang.String |
CUSTOM_EXPRESSIONS_NOT_ALLOWED |
protected static org.slf4j.Logger |
logger |
TableMetadata |
metadata |
protected StatementType |
type |
| Constructor and Description |
|---|
ModificationStatement(StatementType type,
VariableSpecifications bindVariables,
TableMetadata metadata,
Operations operations,
StatementRestrictions restrictions,
Conditions conditions,
Attributes attrs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConditions(Clustering<?> clustering,
CQL3CasRequest request,
QueryOptions options) |
void |
addFunctionsTo(java.util.List<Function> functions) |
abstract void |
addUpdateForKey(PartitionUpdate.Builder updateBuilder,
Clustering<?> clustering,
UpdateParameters params) |
abstract void |
addUpdateForKey(PartitionUpdate.Builder updateBuilder,
Slice slice,
UpdateParameters params) |
java.lang.Iterable<Operation> |
allOperations() |
static boolean |
appliesOnlyToStaticColumns(Operations operation,
Conditions conditions)
Checks that the specified operations and conditions only apply to static columns.
|
void |
authorize(ClientState state)
Perform any access verification necessary for the statement.
|
java.util.List<java.nio.ByteBuffer> |
buildPartitionKeyNames(QueryOptions options) |
java.lang.String |
columnFamily() |
RegularAndStaticColumns |
conditionColumns() |
java.util.NavigableSet<Clustering<?>> |
createClustering(QueryOptions options) |
ResultMessage |
execute(QueryState queryState,
QueryOptions options,
long queryStartNanoTime)
Execute the statement and return the resulting result or null if there is no result.
|
ResultMessage |
executeInternalWithCondition(QueryState state,
QueryOptions options) |
ResultMessage |
executeInternalWithoutCondition(QueryState queryState,
QueryOptions options,
long queryStartNanoTime) |
ResultMessage |
executeLocally(QueryState queryState,
QueryOptions options)
Variant of execute used for internal query against the system tables, and thus only query the local node.
|
java.util.List<ColumnSpecification> |
getBindVariables()
Returns all bind variables for the statement
|
java.lang.Iterable<ColumnMetadata> |
getColumnsWithConditions() |
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
|
short[] |
getPartitionKeyBindVariableIndexes()
Returns an array with the same length as the number of partition key columns for the table corresponding
to table.
|
java.util.List<Operation> |
getRegularOperations() |
StatementRestrictions |
getRestrictions() |
java.util.List<Operation> |
getStaticOperations() |
long |
getTimestamp(long now,
QueryOptions options) |
int |
getTimeToLive(QueryOptions options) |
boolean |
hasConditions()
Whether or not this CQL Statement has LWT conditions
|
boolean |
hasIfExistCondition() |
boolean |
hasIfNotExistCondition() |
boolean |
hasSlices() |
boolean |
isCounter() |
boolean |
isTimestampSet() |
boolean |
isView() |
boolean |
isVirtual() |
java.lang.String |
keyspace() |
TableMetadata |
metadata() |
boolean |
requiresRead() |
RegularAndStaticColumns |
updatedColumns() |
boolean |
updatesRegularRows() |
boolean |
updatesStaticRow() |
void |
validate(ClientState state)
Perform additional validation required by the statment.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAuditLogContextprotected static final org.slf4j.Logger logger
public static final java.lang.String CUSTOM_EXPRESSIONS_NOT_ALLOWED
protected final StatementType type
protected final VariableSpecifications bindVariables
public final TableMetadata metadata
public ModificationStatement(StatementType type, VariableSpecifications bindVariables, TableMetadata metadata, Operations operations, StatementRestrictions restrictions, Conditions conditions, Attributes attrs)
public java.util.List<ColumnSpecification> getBindVariables()
CQLStatementgetBindVariables in interface CQLStatementpublic short[] getPartitionKeyBindVariableIndexes()
CQLStatementgetPartitionKeyBindVariableIndexes in interface CQLStatementpublic java.lang.Iterable<Function> getFunctions()
CQLStatementgetFunctions in interface CQLStatementpublic void addFunctionsTo(java.util.List<Function> functions)
public TableMetadata metadata()
public StatementRestrictions getRestrictions()
public abstract void addUpdateForKey(PartitionUpdate.Builder updateBuilder, Clustering<?> clustering, UpdateParameters params)
public abstract void addUpdateForKey(PartitionUpdate.Builder updateBuilder, Slice slice, UpdateParameters params)
public java.lang.String keyspace()
keyspace in interface CQLStatement.SingleKeyspaceCqlStatementpublic java.lang.String columnFamily()
public boolean isCounter()
public boolean isView()
public boolean isVirtual()
public long getTimestamp(long now,
QueryOptions options)
throws InvalidRequestException
InvalidRequestExceptionpublic boolean isTimestampSet()
public int getTimeToLive(QueryOptions options) throws InvalidRequestException
InvalidRequestExceptionpublic void authorize(ClientState state) throws InvalidRequestException, UnauthorizedException
CQLStatementauthorize in interface CQLStatementstate - the current client stateInvalidRequestExceptionUnauthorizedExceptionpublic void validate(ClientState state) throws InvalidRequestException
CQLStatementvalidate in interface CQLStatementstate - the current client stateInvalidRequestExceptionpublic RegularAndStaticColumns updatedColumns()
public RegularAndStaticColumns conditionColumns()
public boolean updatesRegularRows()
public boolean updatesStaticRow()
public java.util.List<Operation> getRegularOperations()
public java.util.List<Operation> getStaticOperations()
public java.lang.Iterable<Operation> allOperations()
public java.lang.Iterable<ColumnMetadata> getColumnsWithConditions()
public boolean hasIfNotExistCondition()
public boolean hasIfExistCondition()
public java.util.List<java.nio.ByteBuffer> buildPartitionKeyNames(QueryOptions options) throws InvalidRequestException
InvalidRequestExceptionpublic java.util.NavigableSet<Clustering<?>> createClustering(QueryOptions options) throws InvalidRequestException
InvalidRequestExceptionpublic static boolean appliesOnlyToStaticColumns(Operations operation, Conditions conditions)
true if the specified operations and conditions only apply to static columns,
false otherwise.public boolean requiresRead()
public boolean hasConditions()
CQLStatementhasConditions in interface CQLStatementpublic boolean hasSlices()
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 void addConditions(Clustering<?> clustering, CQL3CasRequest request, QueryOptions options) throws InvalidRequestException
InvalidRequestExceptionpublic ResultMessage executeLocally(QueryState queryState, QueryOptions options) throws RequestValidationException, RequestExecutionException
CQLStatementexecuteLocally in interface CQLStatementqueryState - the current query stateRequestValidationExceptionRequestExecutionExceptionpublic ResultMessage executeInternalWithoutCondition(QueryState queryState, QueryOptions options, long queryStartNanoTime) throws RequestValidationException, RequestExecutionException
public ResultMessage executeInternalWithCondition(QueryState state, QueryOptions options)
Copyright © 2009-2022 The Apache Software Foundation