/** * Adds a condition to the DELETE statement this WHERE clause is part of. * * @param condition the condition to add. * @return the conditions for the DELETE statement this WHERE clause is part of. */ public Conditions onlyIf(Clause condition) { return statement.onlyIf(condition); } }
/** * Adds a condition to the DELETE statement this WHERE clause is part of. * * @param condition the condition to add. * @return the conditions for the DELETE statement this WHERE clause is part of. */ public Conditions onlyIf(Clause condition) { return statement.onlyIf(condition); } }
/** * Adds a condition to the DELETE statement this WHERE clause is part of. * * @param condition the condition to add. * @return the conditions for the DELETE statement this WHERE clause is part of. */ public Conditions onlyIf(Clause condition) { return statement.onlyIf(condition); } }
/** * Adds a condition to the DELETE statement this WHERE clause is part of. * * @param condition the condition to add. * @return the conditions for the DELETE statement this WHERE clause is part of. */ public Conditions onlyIf(Clause condition) { return statement.onlyIf(condition); } }
private void initDeleteIfIdStatement() { Delete delete = generateDelete(table, pkColumns, false); Delete.Conditions deleteIf = delete.onlyIf(eq(exchangeIdColumn, bindMarker())); deleteIf = applyConsistencyLevel(deleteIf, writeConsistencyLevel); LOGGER.debug("Generated Delete If Id {}", deleteIf); deleteIfIdStatement = getSession().prepare(deleteIf); }
insertInto("foo").value("k", 1).value("v", Sets.newHashSet(now())).ifNotExists(), delete().from("foo").where(eq("k", 2)).ifExists(), delete().from("foo").onlyIf(eq("k", 2)),
delete.onlyIf(onlyIfCondition);
delete.onlyIf(onlyIfCondition);
insertInto("foo").value("k", 1).value("v", Sets.newHashSet(now())).ifNotExists(), delete().from("foo").where(eq("k", 2)).ifExists(), delete().from("foo").onlyIf(eq("k", 2)),