T - the type of the generated querypublic interface QueryBackend<T extends GeneratedQueryContext>
| Modifier and Type | Method and Description |
|---|---|
QueryResult |
doRun(SearchJob job,
Query query,
T queryContext,
Set<QueryResult> predecessorResults)
Run the generated query as part of the given query job.
|
default AbsoluteRange |
effectiveTimeRangeForResult(Query query,
QueryResult queryResult) |
T |
generate(SearchJob job,
Query query,
Set<QueryResult> predecessorResults)
Generate a backend-specific query out of the logical query structure.
|
default boolean |
isAllMessages(TimeRange timeRange) |
QueryMetadata |
parse(com.google.common.collect.ImmutableSet<Parameter> parameters,
Query query)
Parse the query and return structural information about it.
|
default QueryResult |
run(SearchJob job,
Query query,
GeneratedQueryContext generatedQueryContext,
Set<QueryResult> predecessorResults) |
T generate(SearchJob job, Query query, Set<QueryResult> predecessorResults)
job - currently executing jobquery - the graylog query structurepredecessorResults - the query result of the preceding queriesdefault boolean isAllMessages(TimeRange timeRange)
default AbsoluteRange effectiveTimeRangeForResult(Query query, QueryResult queryResult)
default QueryResult run(SearchJob job, Query query, GeneratedQueryContext generatedQueryContext, Set<QueryResult> predecessorResults)
QueryResult doRun(SearchJob job, Query query, T queryContext, Set<QueryResult> predecessorResults)
This method is typically being run in an executor and can safely block.
job - currently executing jobquery - the individual query to run from the current jobqueryContext - the generated query by generate(SearchJob, Query, Set)predecessorResults - the query result of the preceding queriesRuntimeException - if the query could not be executed for some reasonQueryMetadata parse(com.google.common.collect.ImmutableSet<Parameter> parameters, Query query)
This method decomposes the backend-specific query and returns information about used parameters, optionally the AST for syntax highlight and other information the UI can use to offer help.
Copyright © 2012–2020 Graylog, Inc.. All rights reserved.