Member Junction
    Preparing search index...

    Class used to run a query and return the results. Provides an abstraction layer for executing saved queries with proper security checks. Supports both instance-based and static provider patterns.

    Index

    Constructors

    Accessors

    Methods

    • Executes a query from a QueryExecutionSpec — the lower-layer interface-based entry point. Runs the full pipeline: composition resolution → Nunjucks template processing → SQL execution. Supports both saved queries (via QueryExecutionSpec.FromQueryInfo) and transient test queries.

      Parameters

      • spec: QueryExecutionSpec

        The execution spec describing the query, parameters, and inline dependencies

      • OptionalcontextUser: UserInfo

        Optional user context for permissions (mainly used server-side)

      Returns Promise<RunQueryResult>

      Query results including data rows and execution metadata

    • Executes multiple queries in a single batch operation. More efficient than calling RunQuery multiple times as it reduces network overhead and allows the database to execute queries in parallel.

      Parameters

      • params: RunQueryParams[]

        Array of query parameters, each specifying a query to execute

      • OptionalcontextUser: UserInfo

        Optional user context for permissions (mainly used server-side)

      Returns Promise<RunQueryResult[]>

      Array of query results in the same order as the input params

    • Executes a saved query and returns the results. The query must exist in the system and the user must have permission to execute it. Queries can be identified by QueryID or by QueryName + CategoryPath combination. CategoryPath supports hierarchical navigation (e.g., "/MJ/AI/Agents/") and falls back to simple name matching.

      Parameters

      • params: RunQueryParams

        Parameters including query ID or name with optional CategoryPath for disambiguation

      • OptionalcontextUser: UserInfo

        Optional user context for permissions (mainly used server-side)

      Returns Promise<RunQueryResult>

      Query results including data rows and execution metadata