Interface: FetchListResult

Oracle® JavaScript Extension Toolkit (JET)
9.2.0

F30740-01

Signature:

interface FetchListResult<K, D>

QuickNav

Fields

FetchListResult

Version:
  • 9.2.0
Since:
  • 4.1.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 {FetchListResult} from "ojs/ojdataprovider";
Generic Parameters
ParameterDescription
KType of Key
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.

Description

Defines the results from the DataProvider method DataProvider#fetchFirst.

Fields

data :D[]

Array of data for each row
Since:
  • 4.1.0

fetchParameters :FetchListParameters.<D>

The FetchListParameters used for the fetch call. In addition, the property fetchParameters is not only the parameter passed through from fetchFirst. The sortCriteria of fetchParameters is the sort criteria specified in fetchFirst parameter, it also include the implicitSort criteria specified in data provider constructor. For example, if implicitSort is set in ArrayDataProvider constructor, it will be returned as part of the sortCriteria of fetchParameters. The collection components, such as ojTable, will look at the sortCriteria to put appropriate sort icon on the UI rendered.
Since:
  • 4.1.0
Example

Example of retrieving sortCriteria from FetchListResult:

let asyncIterator = dataprovider.fetchFirst(options)[Symbol.asyncIterator]();
let result = await asyncIterator.next();
let sortCriteria = result.value.fetchParameters.sortCriteria;

metadata :Array.<ItemMetadata.<K>>

Array of {link@ ItemMetadata} for each row
Since:
  • 4.1.0