Interface: AttributeFilterDef

Oracle® JavaScript Extension Toolkit (JET)
12.1.0

F52696-01

Since:
  • 7.0.0
Module:
  • ojdataprovider

QuickNav

Fields

Description

Defines a kind of DataFilter.FilterDef which applies to the attributes in item data.


Usage

Signature:

interface AttributeFilterDef<D>

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

For additional information visit:


Fields

(static) AttributeExpression :string

AttributeExpression enum

Attribute expressions supported

Properties:
Name Type Default Description
* string * Attribute wildcard
Since:
  • 9.0.0

(static) AttributeOperator :string

AttributeOperator enum

The operators are based on the filtering spec of the RFC 7644 SCIM protocol:
SCIM Filtering

Properties:
Name Type Default Description
$co string $co The entire operator value must be a substring of the attribute value for a match.
$eq string $eq The attribute and operator values must be identical for a match.
$ew string $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.
$ge string $ge If the attribute value is greater than or equal to the operator value, there is a match.
$gt string $gt If the attribute value is greater than the operator value, there is a match.
$le string $le If the attribute value is less than or equal to the operator value, there is a match.
$lt string $lt If the attribute value is less than the operator value, there is a match.
$ne string $ne The attribute and operator values are not identical.
$pr string $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.
$regex string $regex If the attribute value satisfies the regular expression, there is a match.
$sw string $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:
  • 9.0.0

(nullable) collationOptions :{sensitivity?: 'base' | 'accent' | 'case' | 'variant'}

An optional object that specifies collation options for the filter. Supported option is 'sensitivity'.

The sensitivity option can have one of the following values, from the least sensitive to the most sensitive:

  • "base": Only strings that differ in base letters compare as unequal. Examples: a ≠ b, a = á, a = A.
  • "accent": Only strings that differ in base letters or accents and other diacritic marks compare as unequal. Examples: a ≠ b, a ≠ á, a = A.
  • "case": Only strings that differ in base letters or case compare as unequal. Examples: a ≠ b, a = á, a ≠ A.
  • "variant": Strings that differ in base letters, accents and other diacritic marks, or case compare as unequal. Other differences may also be taken into consideration. Examples: a ≠ b, a ≠ á, a ≠ A.

The default is "variant".

For more details, please refer to Collator.

For example, if the data are in English, a case-insensitive search can be achieved with sensitivity of "base". A case-sensitive search can be achieved with sensitivity of "variant".

Since:
  • 12.0.0
Example

Filter definition which filters on DepartmentName for "Marketing" using case-insensitive search.

{op: '$eq', collationOptions: {sensitivity: "base"}, value: {DepartmentName: 'Marketing'}}

op :AttributeFilterDef.AttributeOperator

Operator to apply for the filter.
Since:
  • 7.0.0

value :any

Specifies the value to filter for. Value should be an object which specifies attribute/value pairs to filter on. The op will be applied to each attribute/value pair and the whole will be AND'd. For subobjects, please specify them in a nested structure.
Since:
  • 7.0.0
Examples

Filter definition which filters on DepartmentId value 10

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

Filter definition which filters on DepartmentId value 10 and DepartmentName is Hello

{op: '$eq', value: {DepartmentId: 10, DepartmentName: 'Hello'}}

Filter definition which filters on subobject Location State is California and DepartmentName is Hello

{op: '$eq', value: {DepartmentName: 'Hello', Location: {State: 'California'}}}