Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2525D7896 for ; Thu, 6 Oct 2011 20:12:11 +0000 (UTC) Received: (qmail 1951 invoked by uid 500); 6 Oct 2011 20:12:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 1906 invoked by uid 500); 6 Oct 2011 20:12:09 -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 1898 invoked by uid 99); 6 Oct 2011 20:12:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2011 20:12:09 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pulpfree1@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2011 20:12:04 +0000 Received: by yxm34 with SMTP id 34so4345294yxm.11 for ; Thu, 06 Oct 2011 13:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=BOmqFYrqswMoyqPlRD1JGQd4l08TBlcNx/YpVbDaLVs=; b=unHOmygiH4FlnU/ePZOyr9d0zG+TtqLlxN6S5HO4El3eCZQkA9eMJmjAPh4c4IAlDf RVfpVwPvfYCngLDB43cmETsEj9GbIZepaCa8+F2lkmmfZkhUmBTg7oPYh6ZfSmKqwl6H Jk1yTGHQwcfouDLSnC+1/7+xkCMSS3T+W21eA= MIME-Version: 1.0 Received: by 10.223.88.148 with SMTP id a20mr5704681fam.28.1317931903581; Thu, 06 Oct 2011 13:11:43 -0700 (PDT) Received: by 10.223.107.65 with HTTP; Thu, 6 Oct 2011 13:11:43 -0700 (PDT) Date: Thu, 6 Oct 2011 16:11:43 -0400 Message-ID: Subject: query parameters in Update Handler functions From: Ron Dyck To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I was attempting to use the=A0"in-place" Update Handler function and ran into an issue with the number of query parameters. After copying the function from the test suite to ensure I had the proper code, I found that I was only able to use the first of the query parameters. The documentation shows the example: http://127.0.0.1:5984//_design//_update/in-place= /?field=3Dtitle&value=3Dtest In my testing, (after replacing with proper values, I was unable to read the last param 'value'. Here's my code: "in-place": "(function (doc, req) {var field =3D req.query.field; var value =3D req.query.value; var message =3D 'set ' + field + ' to ' + value; doc[field] =3D value; return [doc, message];})", The value of req.query.field is good. Your help is appreciated. ron -- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Ron Dyck pulpfree1@gmail.com www.webbtech.net =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D