Interface: FilterCapability

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-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) nestedFilter :any

Existence of this property indicates that NestedFilter is supported. The property value can be used to convey more information to the caller. If this property is specified (even though its value may be empty or false), it indicates that nested filtering is supported.
Since:
  • 13.0.0

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

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

(nullable) textFilter :any

Existence of this property indicates that TextFilter is supported. The property value can be used to convey more information to the caller. If this property is specified (even though its value may be empty or false), it indicates that text filtering is supported. If this property is undefined, it indicates that text filtering is not supported, in which case the value of textFilterMatching is ignored.
Since:
  • 8.0.0

(nullable) textFilterMatching :{matchBy?: Array.<'phrase' | 'startsWith' | 'contains' | 'fuzzy'>}

This property indicates the capability of using certain text filtering mechanisms. The value of this property is honored only when textFilter property also exists. All TextFilter supports default matchBy mechanism (TextFilterDef.matchBy = 'unknown') in addition to the options listed here.
Since:
  • 14.1.0