Member Junction
    Preparing search index...

    Tracks which queries reference other queries via {{query:"..."}} composition syntax. Auto-populated by the query save pipeline when SQL contains composition tokens. Maps to the QueryDependency database table.

    Use MJQueryDependencyEntity from @memberjunction/core-entities instead.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    __mj_CreatedAt: Date = null

    Record creation timestamp

    __mj_UpdatedAt: Date = null

    Record last update timestamp

    Alias: string = null

    SQL alias used for the referenced query in a FROM/JOIN clause (e.g., "ac" in FROM {{query:...}} ac)

    DependsOnQuery: string = null

    Name of the referenced (depended-on) query

    DependsOnQueryID: string = null

    Foreign key to the query being referenced (the dependency)

    DetectionMethod: "Manual" | "Auto" = 'Auto'

    How this dependency was detected: Auto (parsed from SQL) or Manual (user-specified)

    ID: string = null

    Unique identifier for this dependency record

    ParameterMapping: string = null

    JSON mapping of parameters. @-prefixed values are pass-through from parent query, otherwise static literals. E.g. {"region": "@region", "year": "2024"}

    Query: string = null

    Name of the query that contains the reference

    QueryID: string = null

    Foreign key to the query that contains the {{query:"..."}} reference

    ReferencePath: string = null

    The full category path and query name as written in SQL (e.g., "Sales/Active Customers")

    Accessors

    • get ParsedParameterMapping(): Record<string, string>

      Gets the parsed parameter mapping as a Record.

      Returns Record<string, string>

      Parsed parameter mapping or empty object if none/invalid

    Methods

    • Copies initialization data from a plain object to the class instance. Only copies properties that already exist on the class to prevent creating new fields. Special handling for DefaultValue fields to extract actual values from SQL Server syntax.

      Parameters

      • initData: any

        The initialization data object

      Returns void

    • Default JSON serialization for BaseInfo subclasses.

      Emits all non-underscored direct field declarations. For _-prefixed private backing fields (the MJ pattern for collection storage — e.g. _Fields, _RelatedEntities, _OrganicKeys), emits the value of the corresponding same-named public getter instead. Purely computed getters without a backing field (display-name formatters, derived flags) are intentionally skipped — they can throw when source fields are null and don't belong on the wire anyway.

      Nested BaseInfo instances and arrays of them unwrap automatically via JSON.stringify's native toJSON() protocol.

      Subclasses may override to emit a filtered subset or custom shape (see EntityFieldValueInfo).

      Returns Record<string, unknown>