Entity

    Class EntityConfiguration<TFields, TIDField>

    The data storage configuration for a type of Entity. Contains information relating to IDs, cachable fields, field mappings, and types of cache and database adapter.

    Type Parameters

    • TFields extends Record<string, any>
    • TIDField extends keyof TFields
    Index

    Constructors

    • Type Parameters

      • TFields extends Record<string, any>
      • TIDField extends string | number | symbol

      Parameters

      • __namedParameters: {
            cacheAdapterFlavor: string;
            cacheKeyVersion?: number;
            compositeFieldDefinitions?: EntityCompositeFieldDefinition<TFields>[];
            databaseAdapterFlavor: string;
            idField: TIDField;
            inboundEdges?: IEntityClass<any, any, any, any, any, any>[];
            schema: Omit<
                Record<keyof TFields, EntityFieldDefinition<any, false>>,
                TIDField,
            > & Record<TIDField, EntityFieldDefinition<any, true>>;
            tableName: string;
        }
        • cacheAdapterFlavor: string

          Cache system for this entity.

        • OptionalcacheKeyVersion?: number

          Cache key version for this entity type. Should be bumped when a field is added to, removed from, or changed in this entity and the underlying database table.

        • OptionalcompositeFieldDefinitions?: EntityCompositeFieldDefinition<TFields>[]

          Composite field definitions for this entity.

        • databaseAdapterFlavor: string

          Backing database and transaction type for this entity.

        • idField: TIDField

          The field used to identify this entity. Must be a unique field in the table.

        • OptionalinboundEdges?: IEntityClass<any, any, any, any, any, any>[]

          List of other entity types that reference this type in EntityFieldDefinition associations.

        • schema: Omit<Record<keyof TFields, EntityFieldDefinition<any, false>>, TIDField> & Record<
              TIDField,
              EntityFieldDefinition<any, true>,
          >

          Map from each entity field to an EntityFieldDefinition specifying information about the field.

        • tableName: string

          The name of the table where entities of this type are stored.

      Returns EntityConfiguration<TFields, TIDField>

    Properties

    cacheableKeys: ReadonlySet<keyof TFields>
    cacheAdapterFlavor: string
    cacheKeyVersion: number
    compositeFieldInfo: CompositeFieldInfo<TFields, TIDField>
    databaseAdapterFlavor: string
    dbToEntityFieldsKeyMapping: ReadonlyMap<string, keyof TFields>
    entityToDBFieldsKeyMapping: ReadonlyMap<keyof TFields, string>
    idField: keyof TFields
    inboundEdges: IEntityClass<any, any, any, any, any, any>[]
    schema: ReadonlyMap<keyof TFields, EntityFieldDefinition<any, any>>
    tableName: string
    MMNEPVFCICPMFPCPTTAAATR