本文整理了Java中com.datastax.driver.core.querybuilder.Update.setNonIdempotentOps()
方法的一些代码示例,展示了Update.setNonIdempotentOps()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Update.setNonIdempotentOps()
方法的具体详情如下:
包路径:com.datastax.driver.core.querybuilder.Update
类名称:Update
方法名:setNonIdempotentOps
暂无
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
/**
* Adds the provided condition for the update.
*
* <p>Note that while the query builder accept any type of {@code Clause} as conditions,
* Cassandra currently only allow equality ones.
*
* @param condition the condition to add.
* @return this {@code Conditions} clause.
*/
public Conditions and(Clause condition) {
statement.setNonIdempotentOps();
conditions.add(condition);
checkForBindMarkers(condition);
return this;
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
/**
* Sets the 'IF EXISTS' option for the UPDATE statement this WHERE clause is part of.
*
* <p>An update with that option will report whether the statement actually resulted in data
* being updated. The existence check and update are done transactionally in the sense that if
* multiple clients attempt to update a given row with this option, then at most one may
* succeed. Please keep in mind that using this option has a non negligible performance impact
* and should be avoided when possible. This will configure the statement as non-idempotent, see
* {@link com.datastax.driver.core.Statement#isIdempotent()} for more information.
*
* @return the UPDATE statement this WHERE clause is part of.
*/
public IfExists ifExists() {
statement.ifExists = true;
statement.setNonIdempotentOps();
return new IfExists(statement);
}
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
/**
* Adds a new assignment for this UPDATE statement.
*
* @param assignment the new Assignment to add.
* @return these Assignments.
*/
public Assignments and(Assignment assignment) {
statement.setCounterOp(assignment instanceof CounterAssignment);
if (!hasNonIdempotentOps() && !Utils.isIdempotent(assignment))
statement.setNonIdempotentOps();
assignments.add(assignment);
checkForBindMarkers(assignment);
return this;
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
/**
* Adds the provided clause to this WHERE clause.
*
* @param clause the clause to add.
* @return this WHERE clause.
*/
public Where and(Clause clause) {
clauses.add(clause);
statement.maybeAddRoutingKey(clause.name(), clause.firstValue());
if (!hasNonIdempotentOps() && !Utils.isIdempotent(clause)) {
statement.setNonIdempotentOps();
}
checkForBindMarkers(clause);
return this;
}
代码示例来源:origin: com.yugabyte/cassandra-driver-core
/**
* Adds the provided condition for the update.
* <p/>
* Note that while the query builder accept any type of {@code Clause}
* as conditions, Cassandra currently only allow equality ones.
*
* @param condition the condition to add.
* @return this {@code Conditions} clause.
*/
public Conditions and(Clause condition) {
statement.setNonIdempotentOps();
conditions.add(condition);
checkForBindMarkers(condition);
return this;
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
/**
* Adds the provided condition for the update.
* <p/>
* Note that while the query builder accept any type of {@code Clause}
* as conditions, Cassandra currently only allow equality ones.
*
* @param condition the condition to add.
* @return this {@code Conditions} clause.
*/
public Conditions and(Clause condition) {
statement.setNonIdempotentOps();
conditions.add(condition);
checkForBindMarkers(condition);
return this;
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
/**
* Adds the provided condition for the update.
* <p/>
* Note that while the query builder accept any type of {@code Clause}
* as conditions, Cassandra currently only allow equality ones.
*
* @param condition the condition to add.
* @return this {@code Conditions} clause.
*/
public Conditions and(Clause condition) {
statement.setNonIdempotentOps();
conditions.add(condition);
checkForBindMarkers(condition);
return this;
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
/**
* Sets the 'IF EXISTS' option for the UPDATE statement this WHERE clause
* is part of.
* <p/>
* An update with that option will report whether the statement actually
* resulted in data being updated. The existence check and update are
* done transactionally in the sense that if multiple clients attempt to
* update a given row with this option, then at most one may succeed.
* </p>
* Please keep in mind that using this option has a non negligible
* performance impact and should be avoided when possible.
* </p>
* This will configure the statement as non-idempotent, see {@link com.datastax.driver.core.Statement#isIdempotent()}
* for more information.
*
* @return the UPDATE statement this WHERE clause is part of.
*/
public IfExists ifExists() {
statement.ifExists = true;
statement.setNonIdempotentOps();
return new IfExists(statement);
}
}
代码示例来源:origin: com.yugabyte/cassandra-driver-core
/**
* Sets the 'IF EXISTS' option for the UPDATE statement this WHERE clause
* is part of.
* <p/>
* An update with that option will report whether the statement actually
* resulted in data being updated. The existence check and update are
* done transactionally in the sense that if multiple clients attempt to
* update a given row with this option, then at most one may succeed.
* </p>
* Please keep in mind that using this option has a non negligible
* performance impact and should be avoided when possible.
* </p>
* This will configure the statement as non-idempotent, see {@link com.datastax.driver.core.Statement#isIdempotent()}
* for more information.
*
* @return the UPDATE statement this WHERE clause is part of.
*/
public IfExists ifExists() {
statement.ifExists = true;
statement.setNonIdempotentOps();
return new IfExists(statement);
}
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
/**
* Sets the 'IF EXISTS' option for the UPDATE statement this WHERE clause
* is part of.
* <p/>
* An update with that option will report whether the statement actually
* resulted in data being updated. The existence check and update are
* done transactionally in the sense that if multiple clients attempt to
* update a given row with this option, then at most one may succeed.
* </p>
* Please keep in mind that using this option has a non negligible
* performance impact and should be avoided when possible.
* </p>
* This will configure the statement as non-idempotent, see {@link com.datastax.driver.core.Statement#isIdempotent()}
* for more information.
*
* @return the UPDATE statement this WHERE clause is part of.
*/
public IfExists ifExists() {
statement.ifExists = true;
statement.setNonIdempotentOps();
return new IfExists(statement);
}
}
代码示例来源:origin: com.yugabyte/cassandra-driver-core
/**
* Adds a new assignment for this UPDATE statement.
*
* @param assignment the new Assignment to add.
* @return these Assignments.
*/
public Assignments and(Assignment assignment) {
statement.setCounterOp(assignment instanceof CounterAssignment);
if (!hasNonIdempotentOps() && !Utils.isIdempotent(assignment))
statement.setNonIdempotentOps();
assignments.add(assignment);
checkForBindMarkers(assignment);
return this;
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
/**
* Adds a new assignment for this UPDATE statement.
*
* @param assignment the new Assignment to add.
* @return these Assignments.
*/
public Assignments and(Assignment assignment) {
statement.setCounterOp(assignment instanceof CounterAssignment);
if (!hasNonIdempotentOps() && !Utils.isIdempotent(assignment))
statement.setNonIdempotentOps();
assignments.add(assignment);
checkForBindMarkers(assignment);
return this;
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
/**
* Adds a new assignment for this UPDATE statement.
*
* @param assignment the new Assignment to add.
* @return these Assignments.
*/
public Assignments and(Assignment assignment) {
statement.setCounterOp(assignment instanceof CounterAssignment);
if (!hasNonIdempotentOps() && !Utils.isIdempotent(assignment))
statement.setNonIdempotentOps();
assignments.add(assignment);
checkForBindMarkers(assignment);
return this;
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
/**
* Adds the provided clause to this WHERE clause.
*
* @param clause the clause to add.
* @return this WHERE clause.
*/
public Where and(Clause clause) {
clauses.add(clause);
statement.maybeAddRoutingKey(clause.name(), clause.firstValue());
if (!hasNonIdempotentOps() && !Utils.isIdempotent(clause)) {
statement.setNonIdempotentOps();
}
checkForBindMarkers(clause);
return this;
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
/**
* Adds the provided clause to this WHERE clause.
*
* @param clause the clause to add.
* @return this WHERE clause.
*/
public Where and(Clause clause) {
clauses.add(clause);
statement.maybeAddRoutingKey(clause.name(), clause.firstValue());
if (!hasNonIdempotentOps() && !Utils.isIdempotent(clause)) {
statement.setNonIdempotentOps();
}
checkForBindMarkers(clause);
return this;
}
代码示例来源:origin: com.yugabyte/cassandra-driver-core
/**
* Adds the provided clause to this WHERE clause.
*
* @param clause the clause to add.
* @return this WHERE clause.
*/
public Where and(Clause clause) {
clauses.add(clause);
statement.maybeAddRoutingKey(clause.name(), clause.firstValue());
if (!hasNonIdempotentOps() && !Utils.isIdempotent(clause)) {
statement.setNonIdempotentOps();
}
checkForBindMarkers(clause);
return this;
}
内容来源于网络,如有侵权,请联系作者删除!