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

  • new Filter<EntityT, FieldT>(field: string | FilterFunction<EntityT, FieldT>, operator: FilterOperatorNumber, value: FieldT, edmType?: "Edm.String" | "Edm.Boolean" | "Edm.Decimal" | "Edm.Double" | "Edm.Single" | "Edm.Float" | "Edm.Int16" | "Edm.Int32" | "Edm.Int64" | "Edm.SByte" | "Edm.Binary" | "Edm.Guid" | "Edm.Byte" | "Edm.Any" | "Edm.DateTimeOffset" | "Edm.DateTime" | "Edm.Time" | "Edm.Date" | "Edm.Duration" | "Edm.TimeOfDay" | "Edm.Enum"): Filter<EntityT, FieldT>
  • Creates an instance of Filter.

    Type parameters

    • EntityT: EntityBase<EntityT>

    • FieldT: undefined | null | string | number | boolean | Moment | Time | Duration | BigNumber | FieldType[]

    Parameters

    • field: string | FilterFunction<EntityT, FieldT>

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

    • operator: FilterOperatorNumber

      Function to be used for matching

    • value: FieldT

      Value to be used by the operator

    • Optional edmType: "Edm.String" | "Edm.Boolean" | "Edm.Decimal" | "Edm.Double" | "Edm.Single" | "Edm.Float" | "Edm.Int16" | "Edm.Int32" | "Edm.Int64" | "Edm.SByte" | "Edm.Binary" | "Edm.Guid" | "Edm.Byte" | "Edm.Any" | "Edm.DateTimeOffset" | "Edm.DateTime" | "Edm.Time" | "Edm.Date" | "Edm.Duration" | "Edm.TimeOfDay" | "Edm.Enum"

      EdmType 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.

Optional edmType

edmType: undefined | "Edm.String" | "Edm.Boolean" | "Edm.Decimal" | "Edm.Double" | "Edm.Single" | "Edm.Float" | "Edm.Int16" | "Edm.Int32" | "Edm.Int64" | "Edm.SByte" | "Edm.Binary" | "Edm.Guid" | "Edm.Byte" | "Edm.Any" | "Edm.DateTimeOffset" | "Edm.DateTime" | "Edm.Time" | "Edm.Date" | "Edm.Duration" | "Edm.TimeOfDay" | "Edm.Enum"

field

field: string | FilterFunction<EntityT, FieldT>

operator

operator: FilterOperatorNumber

value

value: FieldT