Improve this doc View source

PagerService
service in module sparql

Description

Service for paging SPARQL results.

AdvancedSparqlService initializes this service, so manual init is not needed.

Usage

new PagerService(sparqlQry, resultSetQry, itemsPerPage, getResults, pagesPerQuery, [itemCount]);

Parameters

ParamTypeDetails
sparqlQrystring

The SPARQL query.

resultSetQrystring

The result set subquery part of the query - i.e. the part which defines the distinct objects that are being paged (containing <PAGE> as a placeholder for SPARQL limit and offset).

itemsPerPagenumber

The size of a single page.

getResultsfunction

A function that returns a promise of results given a SPARQL query.

pagesPerQuerynumber

The number of pages to get per query.

(default: 1)

[itemCount]number

The total number of items that the sparqlQry returns. Optional, will be queried based on the resultSetQry if not given.

Methods