Modifier and Type | Field and Description |
---|---|
protected Boolean |
isCounterOp |
protected T |
statement |
Modifier and Type | Method and Description |
---|---|
Insert.Options |
and(Using using)
Adds the provided option.
|
protected StringBuilder |
buildQueryString() |
Query |
disableTracing()
Disables tracing for this query.
|
Query |
enableTracing()
Enables tracing for this query.
|
ConsistencyLevel |
getConsistencyLevel()
Returns the consistency level.
|
String |
getQueryString()
Returns the query string for this statement.
|
RetryPolicy |
getRetryPolicy()
Returns the retry policy sets for this query, if any.
|
ByteBuffer |
getRoutingKey()
Returns the routing key (in binary raw form) to use for token aware
routing of this query.
|
protected boolean |
isCounterOp() |
boolean |
isTracing()
Returns whether tracing is enabled for this query or not.
|
Query |
setConsistencyLevel(ConsistencyLevel consistency)
Sets the consistency level for the query.
|
protected void |
setCounterOp(boolean isCounterOp) |
protected void |
setDirty() |
Query |
setRetryPolicy(RetryPolicy policy)
Sets the retry policy to use for this query.
|
Insert |
value(String name,
Object value)
Adds a column/value pair to the values inserted by this INSERT statement.
|
Insert |
values(String[] names,
Object[] values)
Adds multiple column/value pairs to the values inserted by this INSERT statement.
|
protected T extends com.datastax.driver.core.querybuilder.BuiltStatement statement
protected Boolean isCounterOp
public Insert.Options and(Using using)
using
- an INSERT option.Options
object.public Insert value(String name, Object value)
name
- the name of the column to insert/update.value
- the value to insert/update for name
.public Insert values(String[] names, Object[] values)
names
- a list of column names to insert/update.values
- a list of values to insert/update. The i
th
value in values
will be inserted for the i
th column
in names
.IllegalArgumentException
- if names.length != values.length
.public String getQueryString()
Statement
protected StringBuilder buildQueryString()
public ByteBuffer getRoutingKey()
Query
The routing key is optional in that implementers are free to
return null
. The routing key is an hint used for token-aware routing (see
TokenAwarePolicy
), and
if provided should correspond to the binary value for the query
partition key. However, not providing a routing key never causes a query
to fail and if the load balancing policy used is not token aware, then
the routing key can be safely ignored.
null
.protected void setDirty()
protected boolean isCounterOp()
public Query setConsistencyLevel(ConsistencyLevel consistency)
Query
The default consistency level, if this method is not called, is ConsistencyLevel.ONE.
setConsistencyLevel
in class Query
consistency
- the consistency level to set.Query
object.public ConsistencyLevel getConsistencyLevel()
Query
getConsistencyLevel
in class Query
ConsistencyLevel.ONE
if no
consistency level has been specified.public Query enableTracing()
Query
enableTracing
in class Query
Query
object.public Query disableTracing()
Query
disableTracing
in class Query
Query
object.public boolean isTracing()
Query
public Query setRetryPolicy(RetryPolicy policy)
Query
The default retry policy, if this method is not called, is the one returned by
Policies.getRetryPolicy()
in the
cluster configuration. This method is thus only useful in case you want
to punctually override the default policy for this request.
setRetryPolicy
in class Query
policy
- the retry policy to use for this query.Query
object.public RetryPolicy getRetryPolicy()
Query
getRetryPolicy
in class Query
null
if no query specific
retry policy has been set through Query.setRetryPolicy(com.datastax.driver.core.policies.RetryPolicy)
(in which case
the Cluster retry policy will apply if necessary).protected void setCounterOp(boolean isCounterOp)
Copyright © 2014. All Rights Reserved.