couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Views" by sho
Date Thu, 12 Jun 2008 19:13:16 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by sho:
http://wiki.apache.org/couchdb/Views

The comment on the change is:
changed text/javascript to application/json in description of temp view header

------------------------------------------------------------------------------
  
  '''Permanent views''' are stored inside special documents called design documents, and can
be accessed via an HTTP ''GET'' request to the URI ''/{dbname}/{docid}/{viewname}'', where
''{docid}'' has the prefix ''_view/'' so that CouchDB recognizes the document as a design
document.
  
- '''Temporary views''' are not stored in the database, but rather executed on demand. To
execute a temporary view, you make an HTTP ''POST'' request to the URI ''/{dbname}/_temp_view'',
where the body of the request contains the code of the view function and the ''Content-Type''
header is set to ''text/javascript''.
+ '''Temporary views''' are not stored in the database, but rather executed on demand. To
execute a temporary view, you make an HTTP ''POST'' request to the URI ''/{dbname}/_temp_view'',
where the body of the request contains the code of the view function and the ''Content-Type''
header is set to ''application/json''.
  
  For both kinds of views, the view is defined by a !JavaScript function that maps view keys
to values (although it is possible to use other languages than !JavaScript by plugging in
third-party view servers).
  

Mime
View raw message