/** * 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; }
/** * 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); } }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }