Complete metadata about a stored query, including its SQL, approval status, quality ranking, and field definitions. This information allows Skip to understand and utilize pre-built queries for analysis and reporting.

Implements IQueryInfoBase for consistency with MJCore types.

Implements

Constructors

Properties

CacheEnabled: boolean = false

When true, query results will be cached in memory with TTL expiration

CacheMaxSize: number

Maximum number of cached result sets for this query. NULL uses default size limit.

CacheTTLMinutes: number

Time-to-live in minutes for cached query results. NULL uses default TTL.

CacheValidationSQL: string

SQL query that returns cache validation fingerprint data (MaxUpdatedAt, RowCount). Used for smart cache refresh to determine if cached data is stale.

Category: string

Category name from the related Query Categories entity

CategoryID: string

Foreign key reference to the Query Categories entity

CategoryPath: string

Full hierarchical path of the category (e.g., "/MJ/AI/Agents/")

Description: string

Detailed description of what the query does and what data it returns

EmbeddingModelID?: string

The AI Model ID used to generate the embedding vector for this query. Required for vector similarity comparisons.

EmbeddingModelName?: string

The name of the AI Model used to generate the embedding vector for this query.

EmbeddingVector?: string

Optional JSON-serialized embedding vector for the query, used for similarity search and query analysis

Entities?: SkipQueryEntityInfo[]

Entities referenced by this query

Field metadata for this query

ID: string

Unique identifier for the query record

Name: string

Name of the query for display and reference

Parameters: SkipQueryParamInfo[]

Parameter definitions for this parameterized query

QualityRank: number

Value indicating the quality of the query, higher values mean better quality

SQL: string

The actual SQL query text to execute, may include Nunjucks template parameters

Status: "Pending" | "In-Review" | "Approved" | "Rejected" | "Obsolete"

Current status of the query in the approval workflow