for ( int i=0; i<batchSize; i++ ) in.addValue("?");
return new StringBuilder( in.toFragmentString() );
}
else {
//a composite key
ConditionFragment byId = new ConditionFragment()
.setTableAlias(alias)
.setCondition( columnNames, "?" );
StringBuilder whereString = new StringBuilder();
if ( batchSize==1 ) {
// if no batch, use "foo = ? and bar = ?"
whereString.append( byId.toFragmentString() );
}
else {
// if a composite key, use "( (foo = ? and bar = ?) or (foo = ? and bar = ?) )" for batching
whereString.append('('); //TODO: unnecessary for databases with ANSI-style joins
DisjunctionFragment df = new DisjunctionFragment();