Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a filter expression to narrow the data on a GetAllRequestBuilder request for multiple entities that match the specified criteria. A filter refers to the field of an entity and restricts the request based on an operator and a value. Entity.FIELD_NAME.operator(value)

Example: Product.NAME.equals('cloud-sdk') creates a filter for the entity Product that matches in case the field NAME equals 'cloud-sdk'.

See also: Filterable

Type parameters

Hierarchy

  • Filter

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

constructor

  • Creates an instance of Filter.

    Type parameters

    Parameters

    • field: string | FilterFunction<EntityT, FieldT>

      Name of the field of the entity to be filtered on or a filter function

    • operator: FilterOperator

      Function to be used for matching

    • value: FieldT

      Value to be used by the operator

    • Optional edmType: EdmTypeShared<ODataVersionOf<EntityT>>

      EDM type of the field to filter on, needed for custom fields

    Returns Filter<EntityT, FieldT>

Properties

Readonly _entity

_entity: EntityT

Entity type of the entity tp be filtered.

Readonly _entityConstructor

_entityConstructor: Constructable<EntityT, unknown>

Constructor type of the entity to be filtered.

_fieldName

_fieldName: string | FilterFunction<EntityT, FieldT>
deprecated

Since v1.16.0. Use field instead.

Copyright Ⓒ 2021 SAP SE or an SAP affiliate company. All rights reserved.

Optional edmType

edmType?: EdmTypeShared<ODataVersionOf<EntityT>>

field

field: string | FilterFunction<EntityT, FieldT>

operator

operator: FilterOperator

value

value: FieldT