Member Junction
    Preparing search index...

    Interface IRunQueryProvider

    Interface for providers that execute stored queries. Supports execution of pre-defined SQL queries with security controls. Queries must be pre-approved and stored in the Query entity.

    interface IRunQueryProvider {
        Config(configData: ProviderConfigDataBase): Promise<boolean>;
        ExecuteQueryFromSpec(
            spec: QueryExecutionSpec,
            contextUser?: UserInfo,
        ): Promise<RunQueryResult>;
        RunQueries(
            params: RunQueryParams[],
            contextUser?: UserInfo,
        ): Promise<RunQueryResult[]>;
        RunQueriesWithCacheCheck?<T = unknown>(
            params: RunQueryWithCacheCheckParams[],
            contextUser?: UserInfo,
        ): Promise<RunQueriesWithCacheCheckResponse<T>>;
        RunQuery(
            params: RunQueryParams,
            contextUser?: UserInfo,
        ): Promise<RunQueryResult>;
    }

    Implemented by

    Index

    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. Used for both saved queries (upper layer maps QueryInfo to spec) and transient test queries.

      Parameters

      • spec: QueryExecutionSpec

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

      • OptionalcontextUser: UserInfo

        Optional user context for permissions (required server-side)

      Returns Promise<RunQueryResult>

      Query results including data rows and execution metadata