if (column.isPrimaryKeyPart()) {
selectStatement.addResultColumn(selectStatement.getTableReference().newColumnReference(refColumn));
columns.add(deleteStatement.getTableReference().newColumnReference(column));
}
}
BooleanConstraint eq = selectStatement.getWhere().createEQ();
eq.addPart(selectStatement.getTableReference().newColumnReference("RefMyName"));
eq.addPlaceholder();
BooleanConstraint bc = deleteStatement.getWhere().createIN();
bc.addPart((ColumnReference[]) columns.toArray(new ColumnReference[columns.size()]));
bc.addPart(selectStatement);
String expect = "DELETE FROM MySchema.MyTable WHERE (MyIndex, VerNum) IN ((SELECT RefMyIndex, RefVerNum FROM MySchema.OtherTable WHERE RefMyName=?))";
String got = gen.getQuery(deleteStatement);
assertEquals(expect, got);
}