Liking cljdoc? Tell your friends :D

sweet-tooth.endpoint.page

Pagination utilities

Pagination utilities
raw docstring

page-paramsclj

(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.
sourceraw docstring

page-to-newclj

(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
sourceraw docstring

PageSortFncljprotocol

Which comparison function to use

Which comparison function to use

ascclj

(asc x)

Ascending fn

Ascending fn

descclj

(desc x)

Descending fn

Descending fn
sourceraw docstring

paginateclj

(paginate p id-key ents)

Returns segments of the paginated entities and their pager

Returns segments of the paginated entities and their pager
sourceraw docstring

sliceclj

(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
sourceraw docstring

sort-fnclj

(sort-fn val sort-order)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close