Pagination and streaming

Returning results a client can consume without loading everything — server-driven paging, and streaming large binaries rather than buffering them.

Overview

SAP SHIPS
Node.js →

@sap/cds Applies implicit and explicit paging to collections, and streams large binary properties rather than buffering them.

Java →

com.sap.cds:cds-services-bom Limits and pages a Select query's result set, and streams cds.LargeString and cds.LargeBinary elements through a Reader or an InputStream rather than buffering them, with the streaming path tested on SAP HANA, PostgreSQL and H2.

Not covered: 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, where @cap-js/attachments and com.sap.cds:cds-feature-attachments take over.

SourceGeneric providers — paginationchecked
THE COMMUNITY ADDS

No community artifact is documented here.

Artifacts2

2 of 2 artifacts
ArtifactSignals
Packages2
@sap/cdsCAP Node.js runtime
Signals
none
com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
Signals
none

Content1

Group by
Piece, what it offers
[Part – 2] Enrich CAP based Services with Behaviors using Annotations
SAP Community, Lukas Schwabe, Blog

Details

Coverage
statecore only, CAP
assessed
SourceGeneric providers — paginationchecked SourceServing Media Datachecked SourceStreamingchecked SourceCAP plugins — Attachmentschecked
For your agent
Ref
capability:pagination-and-streaming
JSON
/capabilities/pagination-and-streaming.json
MCP
Connecting an agent