Class QueryEngine

java.lang.Object
com.axelor.meta.query.QueryEngine

@Singleton public class QueryEngine extends Object
  • Constructor Details

    • QueryEngine

      public QueryEngine()
  • Method Details

    • validate

      public void validate(Query query)
    • referencedModels

      public List<ResolvedModel> referencedModels(Query query)
      Returns every model referenced by the query (root, joins, and nested subqueries). Callers can use this to apply additional, caller-specific authorization (e.g. an AI agent model whitelist) on top of the per-user access checks the analyzer already enforces.
    • execute

      public QueryResult execute(Query query)
    • execute

      public QueryResult execute(Query query, Map<String,Object> params)
    • execute

      public QueryResult execute(Query query, Map<String,Object> params, Integer limit, Integer offset)
    • execute

      public QueryResult execute(Query query, Map<String,Object> params, Integer limit, Integer offset, Integer maxRows)
      Runs a query with the engine's row cap tightened to maxRows for this call. A result cut to it reports truncated, as one cut by the engine's own cap does: the caller asked for no such window, so its rows are not the whole answer.
    • execute

      public QueryResult execute(Query query, Map<String,Object> params, Integer limit, Integer offset, Integer maxRows, QueryAccess access)
      Runs a query held to access rather than to the current user's permissions alone: its checks refuse what the query reads, its row predicates filter the root, every join and every subquery.