final int collectionId = ( ( Collection )i.next() ).getId();
//Compute a key for the start value in the collection
if( stringType ) {
final Value startKey = new QNameValue( collectionId, qnames[j], start, broker.getBrokerPool().getSymbols() );
final IndexQuery query = new IndexQuery( IndexQuery.TRUNC_RIGHT, startKey );
dbValues.query( query, cb );
} else {
final Value startKey = new QNameValue( collectionId, qnames[j], start, broker.getBrokerPool().getSymbols() );
final Value prefixKey = new QNamePrefixValue( collectionId, qnames[j], start.getType(), broker.getBrokerPool().getSymbols() );
final IndexQuery query = new IndexQuery( IndexQuery.GEQ, startKey );
dbValues.query( query, prefixKey, cb );
}
}
catch( final EXistException e ) {
LOG.error( e.getMessage(), e );