Interface: FilterCapability

Oracle® JavaScript Extension Toolkit (JET)
12.1.0

F52696-01

Since:
  • 5.0.0
Module:
  • ojdataprovider

QuickNav

Fields

Description

Defines the result from the DataProvider method DataProvider#getCapability for capability "filter"


Usage

Signature:

interface FilterCapability

Typescript Import Format
//To use this interface, import as below.
import {FilterCapability} from "ojs/ojdataprovider";

For additional information visit:


Fields

(nullable) attributeExpression :Array.<AttributeFilterDef.AttributeExpression>

An array of supported attribute expressions.
Since:
  • 5.0.0

(nullable) collationOptions :{sensitivity?: Array.<'base' | 'accent' | 'case' | 'variant'>}

An object that specifies the supported collation options.

The possible option is "sensitivity", which is an array of supported sensitivity values.

The sensitivity values can be one or more of the following, 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.

For more details, please refer to Collator.

When handling sensitivity, implementations that cannot support a requested sensitivity should use the next supported sensitivity that is less sensitive. For example, if an implementation supports ["base", "variant"] and a filter specifies "accent", then the implementation should use "base" in its filtering.

Since:
  • 12.0.0
Example

Implementation that supports all sensitivity values

getCapability(capabilityName) {
  if (capabilityName === 'filter') {
    return {
      collationOptions: {sensitivity: ['base', 'accent', 'case', 'variant']},
      // Other filter capabilities such as "operators" and "textFilter" should be returned here
    }
  }
  // Other capabilityName such as "fetchFirst" and "sort" should be handled here
}

(nullable) operators :Array.<(AttributeFilterDef.AttributeOperator|CompoundFilterDef.CompoundOperator)>

An array of supported filter operator strings. The filter operators may be for AttributeFilter or CompoundFilter.
Since:
  • 5.0.0

(nullable) textFilter :any

Existence of this property indicates that TextFilter is supported. The property value can be used convey more information to the caller.
Since:
  • 8.0.0