Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 76115 invoked from network); 17 May 2010 20:09:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 May 2010 20:09:25 -0000 Received: (qmail 73832 invoked by uid 500); 17 May 2010 19:07:24 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 73793 invoked by uid 500); 17 May 2010 19:07:24 -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 73785 invoked by uid 99); 17 May 2010 19:07:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 19:07:24 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.17.8] (HELO moutng.kundenserver.de) (212.227.17.8) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 19:07:19 +0000 Received: from [192.168.0.127] (xdsl-78-35-58-85.netcologne.de [78.35.58.85]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MBq6h-1O6hXS1GGF-00Aekm; Mon, 17 May 2010 21:06:57 +0200 Message-ID: <4BF193D0.8020403@digitalgott.de> Date: Mon, 17 May 2010 21:06:56 +0200 From: "c.Kleinhuis" Reply-To: ck@digitalgott.de User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: couchdb sub queries ? References: <5C2BB48D-1AE5-405E-8607-FE7108B4C39A@gmail.com> <4BF15FEE.1020200@digitalgott.de> <4BF18FA4.2060506@digitalgott.de> <89836297-56D1-4AC9-937C-7911F3A98ADC@googlemail.com> In-Reply-To: <89836297-56D1-4AC9-937C-7911F3A98ADC@googlemail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V01U2FsdGVkX18K9HG/Ktc1mYvFjar80X/MbU0+jQJKL87Kzjb 1OTn1W5YPyFNo9FUJfyJSgZG/UHwRar7JJFwjBXw89oMnaFKB0 IYWD2Qc8dYgMpVVVyC2uM42f7Vl0pSx hi > since !json is executed when you push your design document to couchdb, no. !json and !macro are replaced by the actual content when you push your couchapp. these macros are not understood by couchdb itself but evaluated by couchapp before it pushes the stuff. > > ah, ok, that indeed makes it hard :D > And subqueries like this are not possible in couchdb, since views are side-effect free and have to run in isolation. Maybe you can create a view to mimic your subqueries, or you have to do it on the client side. Out of the box there are no (and probability never will be) sub-querys in couchdb. > ok, so, i would put it into ajax requests of my edit page :D thx > On 17.05.2010, at 20:49, c.Kleinhuis wrote: > > >> can i include other views with the macro functions ?! >> i mean, an include like >> !json http://localhost/db/design/view/myview >> >> would be cool :D >> >> thx >> >> >>> AFAIK subquery is not possible, but maybe !code or !json macro could >>> solve your problem. >>> >>> !code imports code from external file, so that all the functions in >>> this file are accessible for you, >>> !json imports code into a variable >>> >>> More details here: >>> http://books.couchdb.org/relax/design-documents/shows >>> >>> Regards >>> -- >>> Paweł Stawicki >>> http://pawelstawicki.blogspot.com >>> http://szczecin.jug.pl >>> >>> >>> >>> >>> On Mon, May 17, 2010 at 17:25, Christian Kleinhuis wrote: >>> >>> >>>> Hello, >>>> >>>> i would like to implement some kind of dynamic object definition, for this >>>> purpose i would like >>>> to have documents of type e.g. "object_template" containing a list of >>>> properties a object shall receive, >>>> e.g. "name, email" >>>> >>>> and i would now like to create a dynamic edit form for creating and editing >>>> those defined data types >>>> >>>> my only idea to make this is to use a sub query in the "views" definition >>>> ... is that possible ?! >>>> >>>> thx in advance >>>> ck >>>> >>>> >>>> >>>> > >