Interface: AttributeExprFilter

Oracle® JavaScript Extension Toolkit (JET)
9.1.0

F30737-01

Signature:

interface AttributeExprFilter<D> extends AttributeExprFilterDef<D>, BaseDataFilter<D>

QuickNav

Fields

AttributeExprFilter

Version:
  • 9.1.0
Since:
  • 8.0.0
Module:
  • ojdataprovider

Module usage

See JET Module Loading for an overview of module usage within JET.

Typescript Import Format
//To use this interface, import as below.
import {AttributeExprFilter} from "ojs/ojdataprovider";
Generic Parameters
ParameterDescription
DType of Data

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

The interface for AttributeExprFilter

Fields

attribute :AttributeFilterDef.AttributeExpression|string

Property which contains an expression specifies which attribute to filter on.
Since:
  • 8.0.0
Inherited From:
Example

Attribute filter definition which filters on DepartmentId value 10

{op: '$eq', attribute: 'DepartmentId', value: 10}

op :AttributeFilterDef.AttributeOperator

Operator to apply for the filter. Valid operators defined in the AttributeFilterOperator union type are the strings:
  • $co The entire operator value must be a substring of the attribute value for a match.
  • $eq The attribute and operator values must be identical for a match.
  • $ew The entire operator value must be a substring of the attribute value matching at the end of the attribute value. This criterion is satisfied if the two strings are identical.
  • $pr If the attribute has a non-empty or non-null value, or if it contains a non-empty node for complex attributes, there is a match.
  • $gt If the attribute value is greater than the operator value, there is a match.
  • $ge If the attribute value is greater than or equal to the operator value, there is a match.
  • $lt If the attribute value is less than the operator value, there is a match.
  • $le If the attribute value is less than or equal to the operator value, there is a match.
  • $ne The attribute and operator values are not identical.
  • $regex If the attribute value satisfies the regular expression, there is a match.
  • $sw The entire operator value must be a substring of the attribute value, starting at the beginning of the attribute value. This criterion is satisfied if the two strings are identical.
Since:
  • 8.0.0
Inherited From:

value :any

Specifies the value to filter for.
Since:
  • 8.0.0
Inherited From:
Example

Filter definition which filters on DepartmentId value 10

{op: '$eq', attribute: 'DepartmentId', value: 10}

Methods

filter(item: D, index?: number, array?: Array<D>): boolean;

Specifies a filter function which has the same signature as the the callback which is specified for the JS Array.filter(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter This function will be optionally used by the DataProvider to do local filtering. This function is required by the DataProvider so that it is possible for DataProvider implementations to at least do local filtering.
Parameters:
Name Type Argument Description
item any The current element being processed in the array.
index number <optional>
The index of the current element being processed in the array.
array Array <optional>
The array filter was called upon.
Since:
  • 8.0.0
Inherited From:
Returns:
True if the element satisfies the filter.
Type
boolean