Interface: FetchListResult

Oracle® JavaScript Extension Toolkit (JET)
10.0.0

F32683-01

Since:
  • 4.1.0
Module:
  • ojdataprovider

QuickNav

Fields

Description

Defines the results from the DataProvider method DataProvider#fetchFirst.


Usage

Signature:

interface FetchListResult<K, D>

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

For additional information visit:


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