Optionally, you can pass in a provider to use for running the query. If not provided, the static provider will be used.
Private _providerPrivate Static _globalGets the query provider to use for execution. Returns the instance provider if set, otherwise falls back to the static provider.
The query provider instance
Static ProviderGets the static query provider instance. Used when no instance-specific provider is configured.
The global query provider
Error if global object store is not available
Sets the static query provider instance. This provider will be used by all RunQuery instances that don't have their own provider.
The query provider to set globally
Error if global object store is not available
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.
Array of query parameters, each specifying a query to execute
Optional contextUser: UserInfoOptional user context for permissions (mainly used server-side)
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 including query ID or name with optional CategoryPath for disambiguation
Optional contextUser: UserInfoOptional user context for permissions (mainly used server-side)
Query results including data rows and execution metadata
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.