Class Update
- java.lang.Object
-
- com.datastax.driver.core.Statement
-
- com.datastax.driver.core.RegularStatement
-
- com.datastax.driver.core.querybuilder.BuiltStatement
-
- com.datastax.driver.core.querybuilder.Update
-
public class Update extends BuiltStatement
A built UPDATE statement.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUpdate.AssignmentsThe assignments of an UPDATE statement.static classUpdate.ConditionsConditions for an UPDATE statement.static classUpdate.IfExistsstatic classUpdate.OptionsThe options of a UPDATE statement.static classUpdate.WhereThe WHERE clause of an UPDATE statement.
-
Field Summary
-
Fields inherited from class com.datastax.driver.core.Statement
idempotent, NULL_PAYLOAD_VALUE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Update.ConditionsonlyIf()Adds a conditions clause (IF) to this statement.Update.ConditionsonlyIf(Clause condition)Adds a conditions clause (IF) to this statement.Update.Optionsusing(Using using)Adds a new options for this UPDATE statement.Update.Wherewhere()Returns a Where statement for this query without adding clause.Update.Wherewhere(Clause clause)Adds a WHERE clause to this statement.Update.Assignmentswith()Returns the assignments of this UPDATE statement.Update.Assignmentswith(Assignment assignment)Adds an assignment to this UPDATE statement.-
Methods inherited from class com.datastax.driver.core.querybuilder.BuiltStatement
escapeId, getKeyspace, getNamedValues, getObject, getObject, getQueryString, getRoutingKey, getValues, hasValues, isIdempotent, setForceNoValues, toString, usesNamedValues
-
Methods inherited from class com.datastax.driver.core.RegularStatement
getQueryString, hasValues, requestSizeInBytes
-
Methods inherited from class com.datastax.driver.core.Statement
disableTracing, enableTracing, getConsistencyLevel, getDefaultTimestamp, getFetchSize, getHost, getLastHost, getNowInSeconds, getOutgoingPayload, getPartitioner, getReadTimeoutMillis, getRetryPolicy, getSerialConsistencyLevel, isBatchIdempotent, isLWT, isTracing, setConsistencyLevel, setDefaultTimestamp, setFetchSize, setHost, setIdempotent, setLastHost, setNowInSeconds, setOutgoingPayload, setPagingState, setPagingState, setPagingStateUnsafe, setReadTimeoutMillis, setRetryPolicy, setSerialConsistencyLevel
-
-
-
-
Method Detail
-
with
public Update.Assignments with(Assignment assignment)
Adds an assignment to this UPDATE statement.This is a shorter/more readable version for
with().and(assignment).- Parameters:
assignment- the assignment to add.- Returns:
- the Assignments of this UPDATE statement.
-
with
public Update.Assignments with()
Returns the assignments of this UPDATE statement.- Returns:
- the assignments of this UPDATE statement.
-
where
public Update.Where where(Clause clause)
Adds a WHERE clause to this statement.This is a shorter/more readable version for
where().and(clause).- Parameters:
clause- the clause to add.- Returns:
- the where clause of this query to which more clause can be added.
-
where
public Update.Where where()
Returns a Where statement for this query without adding clause.- Returns:
- the where clause of this query to which more clause can be added.
-
onlyIf
public Update.Conditions onlyIf(Clause condition)
Adds a conditions clause (IF) to this statement.This is a shorter/more readable version for
onlyIf().and(condition).This will configure the statement as non-idempotent, see
Statement.isIdempotent()for more information.- Parameters:
condition- the condition to add.- Returns:
- the conditions of this query to which more conditions can be added.
-
onlyIf
public Update.Conditions onlyIf()
Adds a conditions clause (IF) to this statement.- Returns:
- the conditions of this query to which more conditions can be added.
-
using
public Update.Options using(Using using)
Adds a new options for this UPDATE statement.- Parameters:
using- the option to add.- Returns:
- the options of this UPDATE statement.
-
-