Member Junction
    Preparing search index...

    Interface IQueryInfoBase

    Base interface for query information shared between MJCore and external systems. Contains the core metadata needed to understand and execute stored queries.

    interface IQueryInfoBase {
        CacheEnabled: boolean;
        CacheMaxSize: number;
        CacheTTLMinutes: number;
        CacheValidationSQL: string;
        Category: string;
        CategoryID: string;
        CategoryPath: string;
        Description: string;
        EmbeddingModelID?: string;
        EmbeddingModelName?: string;
        EmbeddingVector?: string;
        Entities?: IQueryEntityInfoBase[];
        Fields: IQueryFieldInfoBase[];
        ID: string;
        IsApproved: boolean;
        Name: string;
        Parameters: IQueryParameterInfoBase[];
        QualityRank: number;
        Reusable: boolean;
        SQL: string;
        SQLDialectID: string;
        Status: "Pending" | "Approved" | "Rejected" | "Expired";
        TechnicalDescription: string;
        UsesTemplate: boolean;
    }

    Implemented by

    Index

    Properties

    CacheEnabled: boolean

    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

    EmbeddingModelName?: string

    The AI Model name used to generate the embedding vector

    EmbeddingVector?: string

    Optional JSON-serialized embedding vector for similarity search

    Entities referenced by this query

    Field metadata for this query

    ID: string

    Unique identifier for the query record

    IsApproved: boolean

    Whether this query has been formally approved for production use. Derived from Status === 'Approved'.

    Name: string

    Name of the query for display and reference

    Parameter definitions for this parameterized query

    QualityRank: number

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

    Reusable: boolean

    When true, this query can be referenced by other queries via the composition syntax {{query:"CategoryPath/QueryName"}}. Only queries with Reusable=true AND Status='Approved' are eligible for composition.

    SQL: string

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

    SQLDialectID: string

    Foreign key to the SQL dialect this query's SQL column is written in. Defaults to T-SQL for backward compatibility.

    Status: "Pending" | "Approved" | "Rejected" | "Expired"

    Current status of the query in the approval workflow

    TechnicalDescription: string

    Technical documentation of the query logic, performance considerations, and parameter usage. Supports markdown content including mermaid diagrams.

    UsesTemplate: boolean

    Automatically set to true when the SQL column contains Nunjucks template markers like {{paramName}}