when startKey is unknown how to implement strategy for couchdb/pouchDb -


numerous readings indicate skip should avoided when doing pagination. in link cite using startkey , limit way go. after first page know startkey of page, lastkey of page , total entries. if have pagination control page numbers buttons , user selects page 3, how there? have no idea startkey of page3. perhaps, simple view front go start keys each page.

this page nicely describes pagination: http://docs.couchdb.org/en/1.6.1/couchapp/views/pagination.html

so, can't have "go page 298", have links previous , next 5 pages, can larger number of preceeding , following documents , generate links accordingly. example, if have 10 posts per page, 50 following keys , take every 10th one.

as making "go page x", perhaps background script generates somesort of cache?


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -