Base class for all metadata providers in MemberJunction. Implements common functionality for metadata caching, refresh, and dataset management. Subclasses must implement abstract methods for provider-specific operations.

Hierarchy (view full)

Implements

Constructors

Properties

Accessors

Methods

Constructors

Properties

_ConfigData: ProviderConfigDataBase<any>
_cachedVisibleExplorerNavigationItems: ExplorerNavigationItem[] = null
_latestLocalMetadataTimestamps: MetadataInfo[]
_latestRemoteMetadataTimestamps: MetadataInfo[]
_localMetadata: AllMetadata = ...
_preRunQueriesResultType: {
    allCached: boolean;
    cacheStatusMap?: Map<number, {
        result?: RunQueryResult;
        status: "disabled" | "hit" | "miss" | "expired";
    }>;
    cachedResults?: RunQueryResult[];
    telemetryEventId?: string;
    uncachedParams?: RunQueryParams[];
}

Result from PreRunQueries hook containing cache status for batch operations

Type declaration

  • allCached: boolean
  • Optional cacheStatusMap?: Map<number, {
        result?: RunQueryResult;
        status: "disabled" | "hit" | "miss" | "expired";
    }>
  • Optional cachedResults?: RunQueryResult[]
  • Optional telemetryEventId?: string
  • Optional uncachedParams?: RunQueryParams[]
_preRunQueryResultType: {
    cacheStatus: "disabled" | "hit" | "miss" | "expired";
    cachedResult?: RunQueryResult;
    fingerprint?: string;
    telemetryEventId?: string;
}

Result from PreRunQuery hook containing cache status and optional cached result

Type declaration

  • cacheStatus: "disabled" | "hit" | "miss" | "expired"
  • Optional cachedResult?: RunQueryResult
  • Optional fingerprint?: string
  • Optional telemetryEventId?: string
_preRunViewResultType: {
    cacheStatus: "disabled" | "hit" | "miss" | "expired";
    cachedResult?: RunViewResult;
    fingerprint?: string;
    telemetryEventId?: string;
}

Result from PreRunView hook containing cache status and optional cached result

Type declaration

  • cacheStatus: "disabled" | "hit" | "miss" | "expired"
  • Optional cachedResult?: RunViewResult
  • Optional fingerprint?: string
  • Optional telemetryEventId?: string
_preRunViewsResultType: {
    allCached: boolean;
    cacheStatusMap?: Map<number, {
        result?: RunViewResult;
        status: "disabled" | "hit" | "miss" | "expired";
    }>;
    cachedResults?: RunViewResult[];
    smartCacheCheckParams?: RunViewWithCacheCheckParams[];
    telemetryEventId?: string;
    uncachedParams?: RunViewParams[];
    useSmartCacheCheck?: boolean;
}

Result from PreRunViews hook containing cache status for batch operations

Type declaration

  • allCached: boolean
  • Optional cacheStatusMap?: Map<number, {
        result?: RunViewResult;
        status: "disabled" | "hit" | "miss" | "expired";
    }>
  • Optional cachedResults?: RunViewResult[]
  • Optional smartCacheCheckParams?: RunViewWithCacheCheckParams[]

    When CacheLocal is enabled, contains the cache check params to send to server

  • Optional telemetryEventId?: string
  • Optional uncachedParams?: RunViewParams[]
  • Optional useSmartCacheCheck?: boolean

    When CacheLocal is enabled, indicates we should use smart cache check

_refresh: boolean = false
_mjMetadataDatasetName: string = 'MJ_Metadata'
localStorageAllMetadataKey: string = ...
localStorageKeys: string[] = ...
localStorageRootKey: string = '___MJCore_Metadata'
localStorageTimestampsKey: string = ...

Accessors

  • get AllowRefresh(): boolean
  • Determines if a refresh is currently allowed or not. Subclasses should return FALSE if they are performing operations that should prevent refreshes. This helps avoid metadata refreshes during critical operations.

    Returns boolean

  • get DatabaseConnection(): any
  • For providers that have ProviderType==='Database', this property will return an object that represents the underlying database connection. For providers where ProviderType==='Network' this property will throw an exception. The type of object returned is provider-specific (e.g., SQL connection pool).

    Returns any

  • get InstanceConnectionString(): string
  • This property is implemented by each sub-class of ProviderBase and is intended to return a unique string that identifies the instance of the provider for the connection it is making. For example: for network connections, the URL including a TCP port would be a good connection string, whereas on database connections the database host url/instance/port would be a good connection string. This is used as part of cache keys to ensure different connections don't share cached data.

    Returns string

  • get LatestRemoteMetadata(): MetadataInfo[]
  • Gets the latest metadata timestamps from the remote server. Used to determine if local cache is out of date.

    Returns MetadataInfo[]

    Array of metadata timestamp information

  • get LocalStoragePrefix(): string
  • This property will return the prefix to use for local storage keys. This is useful if you have multiple instances of a provider running in the same environment and you want to keep their local storage keys separate. The default implementation returns an empty string, but subclasses can override this to return a unique string based on the connection or other distinct identifier.

    Returns string

  • get PreRunQueriesResult(): {
        allCached: boolean;
        cacheStatusMap?: Map<number, {
            result?: RunQueryResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>;
        cachedResults?: RunQueryResult[];
        telemetryEventId?: string;
        uncachedParams?: RunQueryParams[];
    }
  • Returns {
        allCached: boolean;
        cacheStatusMap?: Map<number, {
            result?: RunQueryResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>;
        cachedResults?: RunQueryResult[];
        telemetryEventId?: string;
        uncachedParams?: RunQueryParams[];
    }

    • allCached: boolean
    • Optional cacheStatusMap?: Map<number, {
          result?: RunQueryResult;
          status: "disabled" | "hit" | "miss" | "expired";
      }>
    • Optional cachedResults?: RunQueryResult[]
    • Optional telemetryEventId?: string
    • Optional uncachedParams?: RunQueryParams[]
  • get PreRunQueryResult(): {
        cacheStatus: "disabled" | "hit" | "miss" | "expired";
        cachedResult?: RunQueryResult;
        fingerprint?: string;
        telemetryEventId?: string;
    }
  • Returns {
        cacheStatus: "disabled" | "hit" | "miss" | "expired";
        cachedResult?: RunQueryResult;
        fingerprint?: string;
        telemetryEventId?: string;
    }

    • cacheStatus: "disabled" | "hit" | "miss" | "expired"
    • Optional cachedResult?: RunQueryResult
    • Optional fingerprint?: string
    • Optional telemetryEventId?: string
  • get PreRunViewResult(): {
        cacheStatus: "disabled" | "hit" | "miss" | "expired";
        cachedResult?: RunViewResult;
        fingerprint?: string;
        telemetryEventId?: string;
    }
  • Returns {
        cacheStatus: "disabled" | "hit" | "miss" | "expired";
        cachedResult?: RunViewResult;
        fingerprint?: string;
        telemetryEventId?: string;
    }

    • cacheStatus: "disabled" | "hit" | "miss" | "expired"
    • Optional cachedResult?: RunViewResult
    • Optional fingerprint?: string
    • Optional telemetryEventId?: string
  • get PreRunViewsResult(): {
        allCached: boolean;
        cacheStatusMap?: Map<number, {
            result?: RunViewResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>;
        cachedResults?: RunViewResult[];
        smartCacheCheckParams?: RunViewWithCacheCheckParams[];
        telemetryEventId?: string;
        uncachedParams?: RunViewParams[];
        useSmartCacheCheck?: boolean;
    }
  • Returns {
        allCached: boolean;
        cacheStatusMap?: Map<number, {
            result?: RunViewResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>;
        cachedResults?: RunViewResult[];
        smartCacheCheckParams?: RunViewWithCacheCheckParams[];
        telemetryEventId?: string;
        uncachedParams?: RunViewParams[];
        useSmartCacheCheck?: boolean;
    }

    • allCached: boolean
    • Optional cacheStatusMap?: Map<number, {
          result?: RunViewResult;
          status: "disabled" | "hit" | "miss" | "expired";
      }>
    • Optional cachedResults?: RunViewResult[]
    • Optional smartCacheCheckParams?: RunViewWithCacheCheckParams[]

      When CacheLocal is enabled, contains the cache check params to send to server

    • Optional telemetryEventId?: string
    • Optional uncachedParams?: RunViewParams[]
    • Optional useSmartCacheCheck?: boolean

      When CacheLocal is enabled, indicates we should use smart cache check

Methods

  • Converts dataset item filters into a unique string key for caching.

    Parameters

    Returns string

    JSON-formatted string representing the filters

  • Copies metadata from the global provider to the local instance. This is used to ensure that the local instance has the latest metadata information available without having to reload it from the server.

    Returns boolean

  • Used to check to see if the entity in question is active or not If it is not active, it will throw an exception or log a warning depending on the status of the entity being either Deprecated or Disabled.

    Parameters

    Returns Promise<void>

  • Gets the current user information from the provider. Must be implemented by subclasses to return user-specific data.

    Returns Promise<UserInfo>

    Current user information including roles and permissions

  • Creates a new instance of a BaseEntity subclass for the specified entity and automatically calls NewRecord() to initialize it. This method serves as the core implementation for entity instantiation in the MemberJunction framework.

    Type Parameters

    Parameters

    • entityName: string

      The name of the entity to create (must exist in metadata)

    • Optional contextUser: UserInfo

      Optional user context for permissions and audit tracking

    Returns Promise<T>

    Promise resolving to the newly created entity instance with NewRecord() called

    Throws

    Error if entity name is not found in metadata or if instantiation fails

  • Creates a new instance of a BaseEntity subclass and loads an existing record using the provided key. This overload provides a convenient way to instantiate and load in a single operation.

    Type Parameters

    Parameters

    • entityName: string

      The name of the entity to create (must exist in metadata)

    • loadKey: CompositeKey

      CompositeKey containing the primary key value(s) for the record to load

    • Optional contextUser: UserInfo

      Optional user context for permissions and audit tracking

    Returns Promise<T>

    Promise resolving to the entity instance with the specified record loaded

    Throws

    Error if entity name is not found, instantiation fails, or record cannot be loaded

  • Gets the display name for a single entity record. Uses the entity's IsNameField or falls back to 'Name' field if available.

    Parameters

    • entityName: string

      The name of the entity

    • compositeKey: CompositeKey

      The primary key value(s) for the record

    • Optional contextUser: UserInfo

      Optional user context for permissions

    Returns Promise<string>

    The display name of the record or null if not found

  • Returns a list of dependencies - records that are linked to the specified Entity/RecordID combination. A dependency is as defined by the relationships in the database. The MemberJunction metadata that is used for this simply reflects the foreign key relationships that exist in the database. The CodeGen tool is what detects all of the relationships and generates the metadata that is used by MemberJunction. The metadata in question is within the EntityField table and specifically the RelatedEntity and RelatedEntityField columns. In turn, this method uses that metadata and queries the database to determine the dependencies. To get the list of entity dependencies you can use the utility method GetEntityDependencies(), which doesn't check for dependencies on a specific record, but rather gets the metadata in one shot that can be used for dependency checking.

    Parameters

    • entityName: string

      the name of the entity to check

    • CompositeKey: CompositeKey
    • Optional contextUser: UserInfo

    Returns Promise<RecordDependency[]>

  • Checks if a specific record is marked as a favorite by the user.

    Parameters

    • userId: string

      The ID of the user to check

    • entityName: string

      The name of the entity

    • CompositeKey: CompositeKey

      The primary key value(s) for the record

    • Optional contextUser: UserInfo

      Optional user context for permissions

    Returns Promise<boolean>

    True if the record is a favorite, false otherwise

  • Internal implementation of RunQueries that subclasses must provide. This method should ONLY contain the batch query execution logic - no pre/post processing. The base class handles all orchestration (telemetry, caching).

    Parameters

    • params: RunQueryParams[]

      Array of query parameters

    • Optional contextUser: UserInfo

      Optional user context for permissions

    Returns Promise<RunQueryResult[]>

  • Internal implementation of RunQuery that subclasses must provide. This method should ONLY contain the query execution logic - no pre/post processing. The base class handles all orchestration (telemetry, caching).

    Parameters

    • params: RunQueryParams

      The query parameters

    • Optional contextUser: UserInfo

      Optional user context for permissions

    Returns Promise<RunQueryResult>

  • Internal implementation of RunView that subclasses must provide. This method should ONLY contain the data fetching logic - no pre/post processing. The base class handles all orchestration (telemetry, caching, transformation).

    Type Parameters

    • T = any

    Parameters

    • params: RunViewParams

      The view parameters

    • Optional contextUser: UserInfo

      Optional user context for permissions

    Returns Promise<RunViewResult<T>>

  • Internal implementation of RunViews that subclasses must provide. This method should ONLY contain the batch data fetching logic - no pre/post processing. The base class handles all orchestration (telemetry, caching, transformation).

    Type Parameters

    • T = any

    Parameters

    • params: RunViewParams[]

      Array of view parameters

    • Optional contextUser: UserInfo

      Optional user context for permissions

    Returns Promise<RunViewResult<T>[]>

  • Loads metadata from local storage if available. Deserializes and reconstructs typed metadata objects.

    Returns Promise<void>

  • Checks if local metadata is obsolete compared to remote metadata. Compares timestamps and row counts to detect changes.

    Parameters

    • Optional type: string

      Optional specific metadata type to check

    Returns boolean

    True if local metadata is out of date

  • This method will merge two or more records based on the request provided. The RecordMergeRequest type you pass in specifies the record that will survive the merge, the records to merge into the surviving record, and an optional field map that can update values in the surviving record, if desired. The process followed is:

    1. A transaction is started
    2. The surviving record is loaded and fields are updated from the field map, if provided, and the record is saved. If a FieldMap not provided within the request object, this step is skipped.
    3. For each of the records that will be merged INTO the surviving record, we call the GetEntityDependencies() method and get a list of all other records in the database are linked to the record to be deleted. We then go through each of those dependencies and update the link to point to the SurvivingRecordID and save the record.
    4. The record to be deleted is then deleted.
    5. The transaction is committed if all of the above steps are succesful, otherwise it is rolled back.

    The return value from this method contains detailed information about the execution of the process. In addition, all attempted merges are logged in the RecordMergeLog and RecordMergeDeletionLog tables.

    Parameters

    Returns Promise<RecordMergeResult>

  • Post-processes entity metadata to establish relationships between entities and their child objects. Links fields, permissions, relationships, and settings to their parent entities.

    Parameters

    • entities: any[]

      Array of entity metadata

    • fields: any[]

      Array of entity field metadata

    • fieldValues: any[]

      Array of entity field value metadata

    • permissions: any[]

      Array of entity permission metadata

    • relationships: any[]

      Array of entity relationship metadata

    • settings: any[]

      Array of entity settings metadata

    Returns any[]

    Processed array of EntityInfo instances with all relationships established

  • Base class utilty method that should be called after each sub-class handles its internal RunViews() process before returning results This handles the optional conversion of simple objects to entity objects for each requested view depending on if the params requests a result_type === 'entity_object'

    Parameters

    Returns Promise<void>

  • Post-processing hook for RunQueries (batch). Handles telemetry end.

    Parameters

    • results: RunQueryResult[]

      Array of query results

    • params: RunQueryParams[]

      Array of query parameters

    • preResult: {
          allCached: boolean;
          cacheStatusMap?: Map<number, {
              result?: RunQueryResult;
              status: "disabled" | "hit" | "miss" | "expired";
          }>;
          cachedResults?: RunQueryResult[];
          telemetryEventId?: string;
          uncachedParams?: RunQueryParams[];
      }

      The pre-processing result

      • allCached: boolean
      • Optional cacheStatusMap?: Map<number, {
            result?: RunQueryResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>
      • Optional cachedResults?: RunQueryResult[]
      • Optional telemetryEventId?: string
      • Optional uncachedParams?: RunQueryParams[]
    • Optional contextUser: UserInfo

      Optional user context

    Returns Promise<void>

  • Post-processing hook for RunQuery. Handles cache storage and telemetry end.

    Parameters

    • result: RunQueryResult

      The query result

    • params: RunQueryParams

      The query parameters

    • preResult: {
          cacheStatus: "disabled" | "hit" | "miss" | "expired";
          cachedResult?: RunQueryResult;
          fingerprint?: string;
          telemetryEventId?: string;
      }

      The pre-processing result

      • cacheStatus: "disabled" | "hit" | "miss" | "expired"
      • Optional cachedResult?: RunQueryResult
      • Optional fingerprint?: string
      • Optional telemetryEventId?: string
    • Optional contextUser: UserInfo

      Optional user context

    Returns Promise<void>

  • Post-processing hook for RunView. Handles result transformation, cache storage, and telemetry end.

    Parameters

    • result: RunViewResult

      The view result

    • params: RunViewParams

      The view parameters

    • preResult: {
          cacheStatus: "disabled" | "hit" | "miss" | "expired";
          cachedResult?: RunViewResult;
          fingerprint?: string;
          telemetryEventId?: string;
      }

      The pre-processing result

      • cacheStatus: "disabled" | "hit" | "miss" | "expired"
      • Optional cachedResult?: RunViewResult
      • Optional fingerprint?: string
      • Optional telemetryEventId?: string
    • Optional contextUser: UserInfo

      Optional user context

    Returns Promise<void>

  • Post-processing hook for RunViews (batch). Handles result transformation, cache storage, and telemetry end.

    Parameters

    • results: RunViewResult[]

      Array of view results

    • params: RunViewParams[]

      Array of view parameters

    • preResult: {
          allCached: boolean;
          cacheStatusMap?: Map<number, {
              result?: RunViewResult;
              status: "disabled" | "hit" | "miss" | "expired";
          }>;
          cachedResults?: RunViewResult[];
          smartCacheCheckParams?: RunViewWithCacheCheckParams[];
          telemetryEventId?: string;
          uncachedParams?: RunViewParams[];
          useSmartCacheCheck?: boolean;
      }

      The pre-processing result

      • allCached: boolean
      • Optional cacheStatusMap?: Map<number, {
            result?: RunViewResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>
      • Optional cachedResults?: RunViewResult[]
      • Optional smartCacheCheckParams?: RunViewWithCacheCheckParams[]

        When CacheLocal is enabled, contains the cache check params to send to server

      • Optional telemetryEventId?: string
      • Optional uncachedParams?: RunViewParams[]
      • Optional useSmartCacheCheck?: boolean

        When CacheLocal is enabled, indicates we should use smart cache check

    • Optional contextUser: UserInfo

      Optional user context

    Returns Promise<void>

  • Base class implementation for handling pre-processing of RunViews() each sub-class should call this within their RunViews() method implementation

    Parameters

    Returns Promise<void>

  • Pre-processing hook for RunQueries (batch). Handles telemetry for batch query operations.

    Parameters

    Returns Promise<{
        allCached: boolean;
        cacheStatusMap?: Map<number, {
            result?: RunQueryResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>;
        cachedResults?: RunQueryResult[];
        telemetryEventId?: string;
        uncachedParams?: RunQueryParams[];
    }>

    Pre-processing result

  • Pre-processing hook for RunQuery. Handles telemetry and cache lookup.

    Parameters

    Returns Promise<{
        cacheStatus: "disabled" | "hit" | "miss" | "expired";
        cachedResult?: RunQueryResult;
        fingerprint?: string;
        telemetryEventId?: string;
    }>

    Pre-processing result with cache status and optional cached result

  • Pre-processing hook for RunView. Handles telemetry, validation, entity status check, and cache lookup.

    Parameters

    Returns Promise<{
        cacheStatus: "disabled" | "hit" | "miss" | "expired";
        cachedResult?: RunViewResult;
        fingerprint?: string;
        telemetryEventId?: string;
    }>

    Pre-processing result with cache status and optional cached result

  • Pre-processing hook for RunViews (batch). Handles telemetry, validation, and cache lookup for multiple views.

    Parameters

    Returns Promise<{
        allCached: boolean;
        cacheStatusMap?: Map<number, {
            result?: RunViewResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>;
        cachedResults?: RunViewResult[];
        smartCacheCheckParams?: RunViewWithCacheCheckParams[];
        telemetryEventId?: string;
        uncachedParams?: RunViewParams[];
        useSmartCacheCheck?: boolean;
    }>

    Pre-processing result with cache status for each view

  • Sets or removes a record's favorite status for a user.

    Parameters

    • userId: string

      The ID of the user

    • entityName: string

      The name of the entity

    • CompositeKey: CompositeKey

      The primary key value(s) for the record

    • isFavorite: boolean

      True to mark as favorite, false to remove

    • contextUser: UserInfo

      User context for permissions (required)

    Returns Promise<void>

  • Transforms the result set from simple objects to entity objects if needed.

    Parameters

    • param: RunViewParams

      The RunViewParams used for the request

    • result: RunViewResult

      The RunViewResult returned from the request

    • Optional contextUser: UserInfo

      The user context for permissions

    Returns Promise<void>

  • Executes the smart cache check flow for RunViews. Calls RunViewsWithCacheCheck on the provider (if available) and processes the results, using cached data for 'current' items and fresh data for 'stale' items.

    Optimized to process all results in parallel using Promise.all for cache lookups, cache updates, and entity transformations.

    Type Parameters

    • T

    Parameters

    • params: RunViewParams[]
    • preResult: {
          allCached: boolean;
          cacheStatusMap?: Map<number, {
              result?: RunViewResult;
              status: "disabled" | "hit" | "miss" | "expired";
          }>;
          cachedResults?: RunViewResult[];
          smartCacheCheckParams?: RunViewWithCacheCheckParams[];
          telemetryEventId?: string;
          uncachedParams?: RunViewParams[];
          useSmartCacheCheck?: boolean;
      }
      • allCached: boolean
      • Optional cacheStatusMap?: Map<number, {
            result?: RunViewResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>
      • Optional cachedResults?: RunViewResult[]
      • Optional smartCacheCheckParams?: RunViewWithCacheCheckParams[]

        When CacheLocal is enabled, contains the cache check params to send to server

      • Optional telemetryEventId?: string
      • Optional uncachedParams?: RunViewParams[]
      • Optional useSmartCacheCheck?: boolean

        When CacheLocal is enabled, indicates we should use smart cache check

    • Optional contextUser: UserInfo

    Returns Promise<RunViewResult<T>[]>

  • Extracts the maximum __mj_UpdatedAt timestamp from a set of results. This is used for cache freshness checking.

    Parameters

    • results: unknown[]

      Array of result objects that may contain __mj_UpdatedAt

    Returns string

    ISO string of the max timestamp, or current time if none found

  • Merges cached and fresh results for RunViews, maintaining original order.

    Parameters

    • preResult: {
          allCached: boolean;
          cacheStatusMap?: Map<number, {
              result?: RunViewResult;
              status: "disabled" | "hit" | "miss" | "expired";
          }>;
          cachedResults?: RunViewResult[];
          smartCacheCheckParams?: RunViewWithCacheCheckParams[];
          telemetryEventId?: string;
          uncachedParams?: RunViewParams[];
          useSmartCacheCheck?: boolean;
      }

      The pre-processing result with cache info

      • allCached: boolean
      • Optional cacheStatusMap?: Map<number, {
            result?: RunViewResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>
      • Optional cachedResults?: RunViewResult[]
      • Optional smartCacheCheckParams?: RunViewWithCacheCheckParams[]

        When CacheLocal is enabled, contains the cache check params to send to server

      • Optional telemetryEventId?: string
      • Optional uncachedParams?: RunViewParams[]
      • Optional useSmartCacheCheck?: boolean

        When CacheLocal is enabled, indicates we should use smart cache check

    • freshResults: RunViewResult[]

      The fresh results from InternalRunViews

    Returns RunViewResult[]

    Combined results in original order

  • Merges cached and fresh results for RunQueries, maintaining original order.

    Parameters

    • preResult: {
          allCached: boolean;
          cacheStatusMap?: Map<number, {
              result?: RunQueryResult;
              status: "disabled" | "hit" | "miss" | "expired";
          }>;
          cachedResults?: RunQueryResult[];
          telemetryEventId?: string;
          uncachedParams?: RunQueryParams[];
      }

      The pre-processing result with cache info

      • allCached: boolean
      • Optional cacheStatusMap?: Map<number, {
            result?: RunQueryResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>
      • Optional cachedResults?: RunQueryResult[]
      • Optional telemetryEventId?: string
      • Optional uncachedParams?: RunQueryParams[]
    • freshResults: RunQueryResult[]

      The fresh results from InternalRunQueries

    Returns RunQueryResult[]

    Combined results in original order

  • Prepares smart cache check parameters for RunViews when CacheLocal is enabled. Instead of returning cached data immediately, this builds params to send to the server which will validate if the cache is current or return fresh data.

    Parameters

    Returns Promise<{
        allCached: boolean;
        cacheStatusMap?: Map<number, {
            result?: RunViewResult;
            status: "disabled" | "hit" | "miss" | "expired";
        }>;
        cachedResults?: RunViewResult[];
        smartCacheCheckParams?: RunViewWithCacheCheckParams[];
        telemetryEventId?: string;
        uncachedParams?: RunViewParams[];
        useSmartCacheCheck?: boolean;
    }>

  • Processes a single smart cache check result. Handles cache lookup for 'current' items and cache update for 'stale' items.

    Type Parameters

    • T

    Parameters

    Returns Promise<{
        cacheHit: boolean;
        cacheMiss: boolean;
        result: RunViewResult<T>;
    }>