Fork me on GitHub
#datomic
<
2019-09-17
>
Oleh K.14:09:16

I understand that this kind of question was asked a lot of time, but how to do a sorted pagination of complex objects in datomic cloud properly? By querying only ID's and sort-by fields, then sorting, dropping and taking a limit and, finally, pulling the entity with all nested fields and objects?

favila14:09:53

yeah, that’s basically the way to go

Joe Lane14:09:15

Do you want the pages to be against the same basis-t of the database? If so, you could separate the querying and sorting from the limit, dropping, and pulling. Then you could stick the sorted resulting eids in a cache somewhere and refer to it by some request guid. Generally I'd go with @U09R86PA4’s approach unless there is a special need for the caching approach above.

Oleh K.16:09:14

Thanks. No, caching is not a variant