@@ -47,20 +47,23 @@ This package contains the [create entity tests](../src/tests/createEntity) and t
4747Retreives a sorted paginated array of entities that match the [ ` filter ` ] ( ./options.md#filter ) option.
4848
4949``` ts
50+ import { backward , forward } from ' js-entity-repos/core/dist/types/PaginationDirection' ;
51+ import { asc , desc } from ' js-entity-repos/core/dist/types/SortOrder' ;
52+
5053const { entities, nextCursor, previousCursor } = await facade .getEntities ({
51- filter: { foo: ' bar ' },
52- sort: { id: true },
53- pagination: { limit: 10 , forward: true , cursor: undefined },
54+ filter: { foo: ' demo ' },
55+ sort: { id: asc , bar: desc },
56+ pagination: { limit: 10 , direction: forward , cursor: undefined },
5457});
5558const secondPage = await facade .getEntities ({
56- filter: { foo: ' bar ' },
57- sort: { id: true },
58- pagination: { limit: 10 , forward: true , cursor: nextCursor },
59+ filter: { foo: ' demo ' },
60+ sort: { id: asc , bar: desc },
61+ pagination: { limit: 10 , direction: forward , cursor: nextCursor },
5962});
6063const firstPage = await facade .getEntities ({
61- filter: { foo: ' bar ' },
62- sort: { id: true },
63- pagination: { limit: 10 , forward: false , cursor: secondPage .previousCursor },
64+ filter: { foo: ' demo ' },
65+ sort: { id: asc , bar: desc },
66+ pagination: { limit: 10 , direction: backward , cursor: secondPage .previousCursor },
6467});
6568```
6669
0 commit comments