@@ -0,0 +1,2959 @@
+package unittests;%0A%0Aimport static com.readytalk.oss.dbms.ExpressionFactory.reference;%0Aimport static com.readytalk.oss.dbms.util.Util.cols;%0Aimport static com.readytalk.oss.dbms.util.Util.list;%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Test;%0A%0Aimport com.readytalk.oss.dbms.Column;%0Aimport com.readytalk.oss.dbms.Constant;%0Aimport com.readytalk.oss.dbms.DuplicateKeyResolution;%0Aimport com.readytalk.oss.dbms.Expression;%0Aimport com.readytalk.oss.dbms.InsertTemplate;%0Aimport com.readytalk.oss.dbms.Parameter;%0Aimport com.readytalk.oss.dbms.PatchTemplate;%0Aimport com.readytalk.oss.dbms.QueryResult;%0Aimport com.readytalk.oss.dbms.QueryResult.Type;%0Aimport com.readytalk.oss.dbms.QueryTemplate;%0Aimport com.readytalk.oss.dbms.Revision;%0Aimport com.readytalk.oss.dbms.RevisionBuilder;%0Aimport com.readytalk.oss.dbms.Revisions;%0Aimport com.readytalk.oss.dbms.Table;%0Aimport com.readytalk.oss.dbms.TableReference;%0A%0Apublic class Diffs %7B%0A%0A  @Test%0A  public void testUpdateNonQueriedColumns() %7B%0A    Column%3CInteger%3E number = new Column%3CInteger%3E(Integer.class);%0A    Column%3CString%3E name = new Column%3CString%3E(String.class);%0A    Column%3CString%3E origin = new Column%3CString%3E(String.class);%0A    Table numbers = new Table(cols(number));%0A  %0A    Revision tail = Revisions.Empty;%0A  %0A    PatchTemplate insert = new InsertTemplate%0A      (numbers,%0A       cols(number, name, origin),%0A       list((Expression) new Parameter(), new Parameter(), new Parameter()),%0A       DuplicateKeyResolution.Throw);%0A  %0A    RevisionBuilder builder = tail.builder();%0A  %0A    builder.apply(insert, 0, %22zero%22, %22far too recently%22);%0A    builder.apply(insert, 1, %22one%22, %22long ago%22);%0A    builder.apply(insert, 2, %22two%22, %22long ago%22);%0A    builder.apply(insert, 3, %22three%22, %22a little less long ago%22);%0A%0A    Revision first = builder.commit();%0A    %0A    TableReference numbersReference = new TableReference(numbers);%0A    %0A    QueryTemplate query = new QueryTemplate%0A    (list((Expression) reference(numbersReference, name)),%0A     numbersReference,%0A     new Constant(true));%0A%0A    QueryResult result = tail.diff(first, query);%0A%0A    assertEquals(QueryResult.Type.Inserted, result.nextRow());%0A    assertEquals(%22zero%22, result.nextItem());%0A    assertEquals(QueryResult.Type.Inserted, result.nextRow());%0A    assertEquals(%22one%22, result.nextItem());%0A    assertEquals(QueryResult.Type.Inserted, result.nextRow());%0A    assertEquals(%22two%22, result.nextItem());%0A    assertEquals(QueryResult.Type.Inserted, result.nextRow());%0A    assertEquals(%22three%22, result.nextItem());%0A    assertEquals(QueryResult.Type.End, result.nextRow());%0A%0A    %0A    builder = first.builder();%0A  %0A    // rewrite history%0A    builder.table(numbers)%0A      .row(0)%0A      .column(origin, %22not long after %3Cone%3E%22)%0A      .up().up();%0A%0A    Revision second = builder.commit();%0A%0A    result = first.diff(second, query);%0A%0A    // we didn't change any of the queried columns, so we shouldn't see any difference.%0A    assertEquals(QueryResult.Type.End, result.nextRow());%0A    %0A  %7D%0A%7D%0A

add testUpdateNonQueriedColumns (currently failing)