tranger2_iterator_get_page()
#
Retrieves a page of records from an iterator in the TimeRanger database. The function returns a JSON object containing the total number of rows, the number of pages based on the specified limit, and the list of retrieved records.
Prototype
json_t *tranger2_iterator_get_page(
json_t *tranger,
json_t *iterator,
json_int_t from_rowid, // based 1
size_t limit,
BOOL backward
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
A pointer to the TimeRanger database instance. |
|
|
A pointer to the iterator from which records will be retrieved. |
|
|
The starting row ID for retrieving records, based on a 1-based index. |
|
|
The maximum number of records to retrieve in the page. |
|
|
If |
Return Value
A JSON object containing the retrieved records, total row count, and pagination details. The caller owns the returned JSON object and must manage its memory.
Notes
This function is useful for paginating through records in an iterator. The from_rowid
parameter determines the starting point, and the limit
parameter controls the number of records retrieved per page.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples