public IndexMatch[] queryMatches(Transaction tx, final IndexQuery query) throws DBException {
final List results = new ArrayList(128);
final IndexPattern pattern = query.getPattern();
try {
query(tx, query, new BTreeCallback() {
public void indexInfo(Value value, Value extra) {
results.add(new IndexMatch(new Key(value), pattern));
}
});
}