Pagination utilities
Pagination utilities
(page-params ctx & allowed-keys)
Get pagination-related params. Includes base set of allowable
params, plus whatever user specifies in allowed-keys
.
Converts :page
and :per-page
to integer.
TODO have route coerce params correctly.
Get pagination-related params. Includes base set of allowable params, plus whatever user specifies in `allowed-keys`. Converts `:page` and `:per-page` to integer. TODO have route coerce params correctly.
(page-to-new new-ent-id page id-key ents)
Updates current page if new entity exists in current page, otherwise returns last page
Updates current page if new entity exists in current page, otherwise returns last page
Which comparison function to use
Which comparison function to use
(asc x)
Ascending fn
Ascending fn
(desc x)
Descending fn
Descending fn
(paginate p id-key ents)
Returns segments of the paginated entities and their pager
Returns segments of the paginated entities and their pager
(slice page per-page ents)
Get a single page of ents out of a collection
Get a single page of ents out of a collection
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close