Interface: FetchByOffsetResults

Oracle® JavaScript Extension Toolkit (JET)
16.0.0

F83701-01

Since:
  • 4.1.0
Module:
  • ojdataprovider

QuickNav

Fields

Description

FetchByOffsetResults defines the result from the DataProvider method DataProvider#fetchByOffset


Usage

Signature:

interface FetchByOffsetResults<K, D>

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

For additional information visit:


Fields

done :boolean

Indicates whether there are more items which can be fetched.

If this is true, fetching the next block will likely return an empty array as the result. A DataProvider can potentially make a stronger guarantee (if the DataProvider is running against an immutable repository or the DataProvider doesn’t attempt to retrieve a subsequent block if the DataProvider believes it is complete). We don’t generally make the stronger guarantee since the repository may have been mutated since the previous response with done:true, such that new records would be returned.

If this is false, fetching the next block may or may not return an empty array as a result.

Since:
  • 4.1.0

fetchParameters :FetchByOffsetParameters.<D>

The FetchByOffsetParameters used for the fetch call. In addition, the property fetchParameters is not only the parameter passed through from fetchByOffset. The sortCriteria of fetchParameters is the sort criteria specified in fetchByOffset parameter, it also optionaly include the implicitSort criteria specified in data provider constructor. For example, if there is no other sort criteria is specified in the fetchParameters, implicitSort set in ArrayDataProvider constructor will be returned as the sortCriteria of fetchParameters. Otherwise, implicitSort will not be included in 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

results :Array.<Item.<K, D>>

Array of Item.
Since:
  • 4.1.0

(nullable) totalFilteredRowCount :number

Total number of rows that can be iterated after applying any filterCriterion.

This is independent of how many rows are returned in each iteration. A value of -1 indicates unknown row count.

Since:
  • 14.0.0
Example

Request and use totalFilteredRowCount

const fetchByOffsetParameters = {includeFilteredRowCount: 'enabled', offset: 2};
const result = dataprovider.fetchByOffset(fetchByOffsetParameters);
let totalFilteredRowCount = result.totalFilteredRowCount;
if (typeof totalFilteredRowCount === 'number' && totalFilteredRowCount !== -1) {
  // Do something with totalFilteredRowCount if available
}