Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 18123 invoked from network); 30 Jul 2010 05:51:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jul 2010 05:51:54 -0000 Received: (qmail 28884 invoked by uid 500); 30 Jul 2010 05:51:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 28386 invoked by uid 500); 30 Jul 2010 05:51:50 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 28377 invoked by uid 99); 30 Jul 2010 05:51:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 05:51:49 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of karel.minarik@gmail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 05:51:42 +0000 Received: by fxm8 with SMTP id 8so894730fxm.11 for ; Thu, 29 Jul 2010 22:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=aK2SgDFJMzhkZTV+kw9rcqjx6A9a7gbzVu0GWmhTlD0=; b=H68w5GWfyqLB3WzJPOhVjUAYx5wRkB+aYVp/va4fz15U+8jl/Z/Utex44PpL01nel1 H8jDN9Aew/6xgm4Nm7XLMNXuOxYP6UEL+BDhpQw5ah+EGYzl4ThUXWNWlCspVJv48muL 1wwxDgZDoQ8nqlWmg4sgpfkzSL8i1dtiQgvpM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=trdT/cRPZikH9l9tT21X8CC5GO27/f3ofcsxKsaVetKIdS13NioV8SQTfzfzv2fclK zncpvotzHU7558X0Ljb7g4vhzIqSI6eg0OvIXl7AVFEIXYEtd0QA2HpjJ8m2RxHPv7NN OFeXuaTLjYs6VPA7i6rXWEGY1v1SGgJqv1hp8= Received: by 10.223.121.19 with SMTP id f19mr1365544far.73.1280469081673; Thu, 29 Jul 2010 22:51:21 -0700 (PDT) Received: from [192.168.2.101] (a40-prg1-10-118.static.adsl.vol.cz [88.146.57.118]) by mx.google.com with ESMTPS id c5sm652314fac.43.2010.07.29.22.51.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Jul 2010 22:51:20 -0700 (PDT) Message-Id: <675F9510-85A3-4468-8A7D-B1A2900AB3EE@gmail.com> From: =?UTF-8?Q?Karel_Mina=C5=99=C3=ADk?= To: user@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: WillPaginate compatible pagination for CouchPotato views (Ruby) Date: Fri, 30 Jul 2010 07:51:21 +0200 References: <40A950DF-294C-40D0-8C09-40C26D8656D1@gmail.com> X-Mailer: Apple Mail (2.936) X-Virus-Checked: Checked by ClamAV on apache.org Hi Chris, thanks for the feedback. I am well aware of the shortcoming. Two =20 reasons, mainly: a) I had the code ready from previous implementation for the RelaxDB =20 gem. b) I had not enough time to figure out/translate the abstract =20 description from the recipe into code. Moreover, will_paginate depends =20= on the "Jump to Page" functionality = [http://mislav.uniqpath.com/page_attachments/0000/0045/will_paginate-digg-= style.png=20 ]. As far as I understand it, that's explicitely explained as =20 impossible with the "correct" solution as presented in recipe? Karel On 29.Jul, 2010, at 19:04 , Chris Anderson wrote: > Why not use the linked list style pagination described also in that =20= > recipe? The problem with the skip approach is that the 1000th page =20 > will take a long time to load (and potentially disrupt database =20 > performance for other queries). I'm not sure what advantage the =20 > approach you take gives over the proper solution. > > Sent from my iPhone > > On Jul 29, 2010, at 7:01 AM, Karel Mina=C5=99=C3=ADk =20 > wrote: > >> Hi, >> >> I've recently needed will_paginate = [http://github.com/mislav/will_paginate/=20 >> ] pagination for CouchPotato [http://github.com/langalex/=20 >> couch_potato] views. >> >> You can get the WillPaginate adapter from the following Gist: >> >> --> http://gist.github.com/498177 >> >> Tests are included in-file. Note that it uses the non-recommended, =20= >> "slow" method of pagination as described in the relax book = (http://books.couchdb.org/relax/reference/recipes#Pagination=20 >> ). Feedback is appreciated. >> >> Karel >> >> -- >> www.karmi.cz