Pocty zaznamu a vetsi stranky z Service Layeru
- GET /api/entities/{set}/$count a /api/<resource>/$count: pocet zaznamu
jednim volanim SAPu, podporuje $filter, vraci { count }
- $inlinecount=allpages (alias $count=true) se predava do Service Layeru
- /all posila Prefer: odata.maxpagesize podle SAP_B1_PAGE_SIZE (vychozi 500)
misto vychozich 20 zaznamu na stranku
- Swagger, README, .env.example, dokumentace a testy
This commit is contained in:
@@ -20,6 +20,10 @@ describe("OData helpers", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("passes $inlinecount through to Service Layer", () => {
|
||||
expect(buildODataParams({ top: 1, inlinecount: "allpages" })).toEqual({ $top: 1, $inlinecount: "allpages" });
|
||||
});
|
||||
|
||||
it("supports old and new nextLink field names", () => {
|
||||
expect(extractNextLink({ "@odata.nextLink": "Items?$skip=20" })).toBe("Items?$skip=20");
|
||||
expect(extractNextLink({ "odata.nextLink": "Items?$skip=40" })).toBe("Items?$skip=40");
|
||||
|
||||
Reference in New Issue
Block a user