Package com.tonic.analysis.query.exec
Class QueryService.QueryResult
- java.lang.Object
-
- com.tonic.analysis.query.exec.QueryService.QueryResult
-
- Enclosing class:
- QueryService
public static final class QueryService.QueryResult extends Object
The outcome of one query run - the source text, its parsed and planned forms, the matches, timing, and either a completion flag or a parse error message.
-
-
Constructor Summary
Constructors Constructor Description QueryResult(String queryText, Query query, ProbePlan plan, List<QueryMatch> results, long executionTimeMs, boolean completed, String error)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompleted()booleanequals(Object o)Stringerror()longexecutionTimeMs()booleanhasError()inthashCode()Queryquery()intresultCount()List<QueryMatch>results()
-
-
-
Method Detail
-
query
public Query query()
- Returns:
- the parsed query, or null if parsing failed
-
results
public List<QueryMatch> results()
- Returns:
- the matches, or null if parsing failed
-
executionTimeMs
public long executionTimeMs()
- Returns:
- the elapsed wall-clock time in milliseconds
-
completed
public boolean completed()
- Returns:
- true if the run finished without being cancelled
-
error
public String error()
- Returns:
- the parse error message, or null if there was none
-
hasError
public boolean hasError()
- Returns:
- true if the run failed to parse
-
resultCount
public int resultCount()
- Returns:
- the number of matches, 0 when there are none
-
-