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): Promise<boolean>;
    RunQueries(params, contextUser?): Promise<RunQueryResult[]>;
    RunQueriesWithCacheCheck?<T>(params, contextUser?): Promise<RunQueriesWithCacheCheckResponse<T>>;
    RunQuery(params, contextUser?): Promise<RunQueryResult>;
}

Implemented by

Methods

  • Executes multiple queries in a single batch operation. More efficient than calling RunQuery multiple times as it reduces network overhead.

    Parameters

    • params: RunQueryParams[]

      Array of query parameters

    • Optional contextUser: UserInfo

      Optional user context for permissions

    Returns Promise<RunQueryResult[]>

    Array of query results in the same order as input params

  • Executes multiple query requests with smart cache checking. For each query with cacheStatus provided, the server uses the Query's CacheValidationSQL to check if the cached data is still current before executing the full query. This reduces unnecessary data transfer when cached data is valid.

    Type Parameters

    • T = unknown

    Parameters

    Returns Promise<RunQueriesWithCacheCheckResponse<T>>

    Response containing status and fresh data only for stale caches