{"ref":"capability:pagination-and-streaming","page":"/capabilities/pagination-and-streaming","json":"/capabilities/pagination-and-streaming.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"pagination-and-streaming","name":"Pagination and streaming","domain":"protocols-and-apis","ecosystems":["cap"],"universal":true,"description":"Returning results a client can consume without loading everything — server-driven paging, and streaming large binaries rather than buffering them.","short":"Server-driven paging and streaming of large results","core_coverage":{"state":"core-only","assessed_at":"2026-09-20","what_core_does":"The generic READ handlers truncate a result set to 1,000 records by default and add an `@odata.nextLink` for the next page; `@cds.query.limit` sets default and maximum page sizes per service or entity. An element annotated `@Core.MediaType` is served as an OData V4 media resource and streamed on read and on PUT, from the database by default.","where_it_stops":"Paging stops at a numeric skip token, which capire states can return duplicate or missing rows if the entity set is modified between the calls: reliable pagination is opt-in, available only for OData V4, and takes no functions or arithmetic expressions in `$orderby`. Streaming stops at the element and at the database: SQLite reads a LargeBinary whole into memory, and keeping uploaded files in an object store, scanning them and annotating the upload control is [attachments](capability:attachments), where [@cap-js/attachments](artifact:cap-js-attachments) and [com.sap.cds:cds-feature-attachments](artifact:cap-java-cds-feature-attachments) take over.","sources":[{"url":"https://cap.cloud.sap/docs/guides/services/served-ootb#pagination","title":"Generic providers — pagination","checked":"2026-09-20","quote":"Using a numeric skip token based on the values of `$skip` and `$top` can result in duplicate or missing rows if the entity set is modified between the calls."},{"url":"https://cap.cloud.sap/docs/guides/services/media-data","title":"Serving Media Data","checked":"2026-09-20","quote":"Please note, that SQLite doesn't support streaming. That means, that LargeBinary fields are read as a whole (not in chunks) and stored in memory, which can impact performance."},{"url":"https://cap.cloud.sap/docs/node.js/streaming","title":"Streaming","checked":"2026-09-20"},{"url":"https://cap.cloud.sap/docs/plugins/","title":"CAP plugins — Attachments","checked":"2026-09-20","quote":"To integrate with cloud storage solutions such as `AWS S3`, `Azure Blob Storage`, or `Google Cloud Storage` through SAP BTP's Object Store service, use the `cds-feature-attachments-oss` package for Java or the `@cap-js/attachments` package for Node.js."}]},"history":[{"date":"2026-08-31","field":"core_coverage.state","from":"core","to":"core-only","reason":"States renamed to describe who is present rather than to interpret intent. left-open-on-purpose asserted a motive; core-and-community states a fact, with relationship carrying the intent separately."}],"drafted_with_ai":true},"sap_delivery":{"door":"cap","all":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]},"by_flavor":{"node":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"}],"documented_pattern":[],"announced":[],"packages":[]},"java":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]}}},"edges":{"use_cases":[],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json","ecosystem":"cap","origin_ring":"sap-official"}],"samples":[],"explained_by":[{"ref":"content:part-2-enrich-cap-based-services-with-behaviors-using-annotations","name":"[Part – 2] Enrich CAP based Services with Behaviors using Annotations","json":"/content/part-2-enrich-cap-based-services-with-behaviors-using-annotations.json"}],"normative_context":[]}}