add query completion
We are using ANTLR listeners to find out where in the query the cursor is. Then we generate a list of keys/values that might fit at that position. With that information we can generate new queries and sort them by the number of results they yield.
This commit is contained in:
@@ -5,7 +5,6 @@ import java.nio.file.Path;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -190,9 +189,7 @@ public class PerformanceDb implements AutoCloseable {
|
||||
|
||||
public List<Proposal> autocomplete(final String query, final int caretIndex) {
|
||||
|
||||
// TODO implement proposals
|
||||
// return db.proposeTagForQuery(query, caretIndex);
|
||||
return Collections.emptyList();
|
||||
return db.propose(query, caretIndex);
|
||||
}
|
||||
|
||||
public List<String> getFields() {
|
||||
|
||||
Reference in New Issue
Block a user