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.

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.

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 <[email protected]> 
>> 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
>>> 
>>> 
>>>    
> 

Reply via email to