ORMLite partial dynamic update


I want to update a single field of a number of rows. The field should be updated to a value +1/-1 to its prior value. A SQL-Equivalent would be:

update mytable 
  set sortIndex = sortIndex - 1
  where orderId >= 2 and orderId <= 5;

How would I do this with ORMLite (database agnostic) ?


Use the UpdateAdd APIs.