Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 41570 invoked from network); 29 Jul 2010 17:08:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jul 2010 17:08:44 -0000 Received: (qmail 10927 invoked by uid 500); 29 Jul 2010 17:08:43 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 10821 invoked by uid 500); 29 Jul 2010 17:08:42 -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 10812 invoked by uid 99); 29 Jul 2010 17:08:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jul 2010 17:08:42 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 209.85.210.52 as permitted sender) Received: from [209.85.210.52] (HELO mail-pz0-f52.google.com) (209.85.210.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jul 2010 17:08:37 +0000 Received: by pzk27 with SMTP id 27so366026pzk.11 for ; Thu, 29 Jul 2010 10:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:references:from :content-type:in-reply-to:message-id:date:to :content-transfer-encoding:mime-version:x-mailer; bh=nLMXP6RcetoGTHc7DH+axlxv3HWNhAfN72/fQOUs02Q=; b=pwjxQw9uM0qeXIDCxoUvVwf/oZ8hVJ7j9ePfhM8Jxgf1CpL3BV9lelBhYjbJqvdJR9 aaYSQpBp9BXtsN0IOCoCR9B7PXfD1zct8wdGa1WLVohIJHqgBVZYgE2hz/61y2uQSV/G DlYBGQYDUOngrPIRYartYSB/mS7FVo3iHRNzI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:references:from:content-type:in-reply-to:message-id:date:to :content-transfer-encoding:mime-version:x-mailer; b=O9kIP7w0n5OwZvxg/g3LBZMsnPW0MatXcqIu30vkKgf4nSnD5qBcxvT9adwv0umqBF +dSY+EdTrohHBV474EcbvjReDXelR8sNeSL106pV9LXVBDYXS8hBAzkUsIvdna1fi66j RXVv6y/stzqJLxyfmrxCleGVwQF3kG7Cjb2qE= Received: by 10.114.109.8 with SMTP id h8mr513896wac.208.1280423296744; Thu, 29 Jul 2010 10:08:16 -0700 (PDT) Received: from [192.168.1.115] (c-98-248-172-14.hsd1.ca.comcast.net [98.248.172.14]) by mx.google.com with ESMTPS id s5sm1875481wak.0.2010.07.29.10.08.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Jul 2010 10:08:15 -0700 (PDT) Subject: Re: WillPaginate compatible pagination for CouchPotato views (Ruby) References: <40A950DF-294C-40D0-8C09-40C26D8656D1@gmail.com> From: Chris Anderson Content-Type: text/plain; charset=utf-8 In-Reply-To: <40A950DF-294C-40D0-8C09-40C26D8656D1@gmail.com> Message-Id: Date: Thu, 29 Jul 2010 10:04:54 -0700 To: "user@couchdb.apache.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPhone Mail 8A306) X-Mailer: iPhone Mail (8A306) Why not use the linked list style pagination described also in that recipe?= The problem with the skip approach is that the 1000th page will take a long= time to load (and potentially disrupt database performance for other querie= s). I'm not sure what advantage the approach you take gives over the proper s= olution. Sent from my iPhone On Jul 29, 2010, at 7:01 AM, Karel Mina=C5=99=C3=ADk wrote: > Hi, >=20 > I've recently needed will_paginate [http://github.com/mislav/will_paginate= /] pagination for CouchPotato [http://github.com/langalex/couch_potato] view= s. >=20 > You can get the WillPaginate adapter from the following Gist: >=20 > --> http://gist.github.com/498177 >=20 > Tests are included in-file. Note that it uses the non-recommended, "slow" m= ethod of pagination as described in the relax book (http://books.couchdb.org= /relax/reference/recipes#Pagination). Feedback is appreciated. >=20 > Karel >=20 > -- > www.karmi.cz