Namespace: FetchByOffsetMixin

Oracle® JavaScript Extension Toolkit (JET)
17.0.0

F92240-01

Since:
  • 4.2.0
Module:
  • ojdataprovider

QuickNav

Description

Mixin class to provide generic implementation of DataProvider#fetchByOffset method for the DataProvider interface.

By default, the mixin implementation will iterate through all the rows to find the result. DataProvider implementations can implement a "getIterationLimit" function that returns a row limit for the iteration:
getIterationLimit() => number

This class cannot be instantiated. You can only call the static applyMixin method to add the implementation to another class.


Usage

Javascript Import Format
define(['ojs/ojdataprovider'], function(dataprovider) {
 // Application should call API on dataprovider.FetchByOffsetMixin 
})
Typescript Import Format
//To import this namespace, use the format below.
import {FetchByOffsetMixin} from "ojs/ojdataprovider";

For additional information visit:


Methods

(static) applyMixin(derivedCtor: {new(): DataProvider<any, any>}): any;

Apply this mixin to another class
Parameters:
Name Type Description
derivedCtor function the constructor of an existing class
Examples

Apply the mixin in Typescript:

class CustomDataProvider<K, D> implements DataProvider<K, D> {
  // Add a stand-in property to satisfy the compiler
  fetchByOffset: (parameters: FetchByOffsetParameters<D>) => Promise<FetchByOffsetResults<K, D>>;

  constructor() {
    // Constructor implementation
  }
}

FetchByOffsetMixin.applyMixin(CustomDataProvider);

Apply the mixin in Javascript:

function CustomDataProvider() {
  // Constructor implementation
}

FetchByOffsetMixin.applyMixin(CustomDataProvider);