use of com.querydsl.sql.dml.SQLUpdateClause in project querydsl by querydsl.
the class UpdateBase method batch_templates.
@Test
public void batch_templates() throws SQLException {
assertEquals(1, insert(survey).values(2, "A", "B").execute());
assertEquals(1, insert(survey).values(3, "B", "C").execute());
SQLUpdateClause update = update(survey);
update.set(survey.name, "AA").where(survey.name.eq(Expressions.stringTemplate("'A'"))).addBatch();
update.set(survey.name, "BB").where(survey.name.eq(Expressions.stringTemplate("'B'"))).addBatch();
assertEquals(2, update.execute());
}
Aggregations