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 604B99B24 for ; Fri, 4 Nov 2011 17:27:16 +0000 (UTC) Received: (qmail 14310 invoked by uid 500); 4 Nov 2011 17:27:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 14234 invoked by uid 500); 4 Nov 2011 17:27:14 -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 14226 invoked by uid 99); 4 Nov 2011 17:27:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 17:27:14 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sean.copenhaver@gmail.com designates 209.85.210.46 as permitted sender) Received: from [209.85.210.46] (HELO mail-pz0-f46.google.com) (209.85.210.46) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 17:20:21 +0000 Received: by pzk1 with SMTP id 1so2673951pzk.5 for ; Fri, 04 Nov 2011 10:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hB0mn4W1JS9dbMmnB51/b0jriAeo/9DuyPH7pD536Ac=; b=XJfv/AuqjaoacFyUYehX4dAuotuYg2KI1o27GCD5C1DWGGHTjMxe4EAjUXOZtCTuHz qLz+oh5hF6/iXA4l4ymoMEsQahBEKdyp03TeldrJYfpVdx189Dy/2/R/ti0Ve+Gj/S2w jd7vX3I8Cyg0ckiZiQBiPJZz4bvK0HVJ8EpKE= MIME-Version: 1.0 Received: by 10.182.235.72 with SMTP id uk8mr3083783obc.75.1320427200072; Fri, 04 Nov 2011 10:20:00 -0700 (PDT) Received: by 10.182.11.1 with HTTP; Fri, 4 Nov 2011 10:20:00 -0700 (PDT) In-Reply-To: <1320426529.64997.YahooMailNeo@web112109.mail.gq1.yahoo.com> References: <1320426529.64997.YahooMailNeo@web112109.mail.gq1.yahoo.com> Date: Fri, 4 Nov 2011 13:20:00 -0400 Message-ID: Subject: Re: couchdb: update_handler get view From: Sean Copenhaver To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=14dae93b6356364c4004b0ebea2b X-Virus-Checked: Checked by ClamAV on apache.org --14dae93b6356364c4004b0ebea2b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I'm pretty sure all the design document functions are suppose to be run in isolation and have no access to anything much more then CommonJS modules and their inputs. Since they are suppose to be pure functions (no side effects) I believe there is no intention of adding access to databases from inside of them. You'll have to use client code or a _changes listener perhaps if you need to store the rules in documents. On Fri, Nov 4, 2011 at 1:08 PM, N/A N/A wrote: > Hello, > > Is it possible access _view from update_handler ? I did try using ajax, > but couch gives me "Error(\"No XMLHTTPRequest support detected\")". I nee= d > this information, because i receive messages in random format. I want to > define message translation rules before insertion. Rules are stored in > couchdb. > > Another idea is to use external process for this task. > > Regards > --=20 =93The limits of language are the limits of one's world. =93 - Ludwig von Wittgenstein "Water is fluid, soft and yielding. But water will wear away rock, which is rigid and cannot yield. As a rule, whatever is fluid, soft and yielding will overcome whatever is rigid and hard. This is another paradox: what is soft is strong." - Lao-Tzu --14dae93b6356364c4004b0ebea2b--