Skip to contents

A wrapper around lt_fetch() that repeatedly queries the database, incrementing the offset until all matching records have been retrieved. Use this in place of lt_fetch() when the result set may exceed the per-request row limit.

Usage

lt_fetch_all(table, ..., page_size = 5000L)

Arguments

table

character; name of the table to query (e.g., "lake_contours").

page_size

integer; number of records to fetch per request. Default 5000. Increase for faster retrieval over stable connections, decrease if requests are timing out.

Value

A tibble::tibble, or an sf::sf object if the table contains geometry data. Row order reflects the server's default ordering unless order is specified.

Errors

ltapi_api_unavailable

The API could not be reached, or returned a 502/503/504.

ltapi_api_error

The API returned an unexpected HTTP error.

See also

lt_fetch() for single-request queries with explicit limit and offset control.

Examples

if (FALSE) { # \dontrun{
  lt_fetch_all(
    table  = "observations",
    filter = lt_filter(lernzmp_id == "LID40188")
  )
} # }