You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2010/04/08 19:43:55 UTC

[Couchdb Wiki] Trivial Update of "HTTP_view_API" by SebastianCohnen

Dear Wiki user,

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

The "HTTP_view_API" page has been changed by SebastianCohnen.
The comment on this change is: added syntax-hl, minor changes, cleanup.
http://wiki.apache.org/couchdb/HTTP_view_API?action=diff&rev1=37&rev2=38

--------------------------------------------------

  
  A design document that defines ''all'', ''by_lastname'', and ''total_purchases'' views might look like this:
  
- {{{
+ {{{#!highlight javascript
  {
    "_id":"_design/company",
    "_rev":"12345",
@@ -154, +154 @@

  curl -X GET http://localhost:5984/databasename/_design/test/_info
  }}}
  will produce something like this:
- {{{
+ {{{#!highlight javascript
  {
      "name": "test", 
      "view_index": {
@@ -193, +193 @@

  
  As of r660140 there is a log function available in the views, which logs to the couch.log. It can be helpful for debugging but hinders performance, so it should be used sparingly in production systems.
  
- {{{
+ {{{#!highlight javascript
  {
    "map": "function(doc) { log(doc); }"
  }
@@ -253, +253 @@

  
  Could result in the following response:
  
- {{{
+ {{{#!highlight javascript
  {
    "total_rows": 1,
    "offset": 0,