Member Junction
    Preparing search index...

    Service managing the dedup cache (MJ: Feature Value Caches) and the keyed Feature Value upserts (MJ: Feature Values, one row per Feature Value key; a row's earlier values are in Record Changes).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ValueKeyIndexName: "UQ_FeatureValue_ValueKey" = 'UQ_FeatureValue_ValueKey'

    The unique index on (RecordProcessID, ValueKeyHash): a second insert of a key fails on it.

    Accessors

    Methods

    • The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.

      Returns GlobalObjectStore

    • Upserts one Feature Value per output on its key (record, feature, pipeline version, prompt version hash, primary model, parameters hash, input hash, source). A key that already holds the same value, reasoning and confidence is left untouched while it is the feature's latest Pipeline value; when another key holds the latest one (a version that becomes Active again), its ComputedAt and run links are refreshed so it is the latest again (counted Unchanged). A historyOnly row is never refreshed. A changed row is updated in place; a new one is inserted.

      Parameters

      Returns Promise<RecordFeatureValuesOutcome>

      How many outputs were upserted or unchanged, and each feature's latest pipeline value before the call.

      FeatureValueSaveError when a row cannot be saved; Error when the rows cannot be read.

    • The typed value a string answer coerces to under its constraint type; undefined when no coercion applies.

      Parameters

      • val: unknown
      • OptionalconstraintType: "boolean" | "enum" | "lookup" | "numeric" | "money" | "date" | "freetext"

      Returns TypedFeatureValue

    • Returns the singleton instance of the class. If the instance does not exist, it is created and stored in the Global Object Store. If className is provided it will be used as part of the key in the Global Object Store, otherwise the actual class name will be used. NOTE: the class name used by default is the lowest level of the object hierarchy, so if you have a class that extends another class, the lowest level class name will be used.

      Type Parameters

      Parameters

      • this: new () => T
      • OptionalclassName: string

      Returns T

    • A value in the typed column its JavaScript type maps to. A string answer to a numeric/money, boolean or date constraint is coerced into that constraint's column when it parses; otherwise it is stored as typed.

      Parameters

      • val: unknown
      • OptionalconstraintType: "boolean" | "enum" | "lookup" | "numeric" | "money" | "date" | "freetext"

      Returns TypedFeatureValue