Entity
    Preparing search index...

    Class EnforcingKnexEntityLoader<TFields, TIDField, TViewerContext, TEntity, TPrivacyPolicy, TSelectedFields>

    Enforcing knex entity loader for non-data-loader-based load methods. All loads through this loader will throw if the load is not successful.

    Type Parameters

    Index

    Constructors

    Properties

    metricsAdapter: IEntityMetricsAdapter

    Methods

    • Count entities matching the conjunction of field equality operands. This does not perform authorization since count does not load full entities. Note that this should be used with the same caution as loadManyByFieldEqualityConjunctionAsync regarding indexing since counts can be expensive on large datasets without appropriate indexes.

      Type Parameters

      • N extends string | number | symbol

      Parameters

      Returns Promise<number>

      count of entities matching the filters

    • Get cursor for a given entity that matches what loadPageAsync would produce. Useful for constructing pagination cursors for entities returned from other loader methods that can then be passed to loadPageAsync for pagination. Most commonly used for testing pagination behavior.

      Parameters

      • entity: TEntity

        The entity to get the pagination cursor for.

      Returns string

      The pagination cursor for the given entity.