couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [2/3] git commit: updated refs/heads/1781-reorganize-and-improve-docs to ec270f6
Date Wed, 21 Aug 2013 16:55:34 GMT
Source article remembers old map function. Now it's actual.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2a42ed58
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2a42ed58
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2a42ed58

Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: 2a42ed580d40caa369ff62777e77e7cee411f680
Parents: 19d36a2
Author: Alexander Shorin <kxepal@apache.org>
Authored: Wed Aug 21 20:49:32 2013 +0400
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Wed Aug 21 20:49:32 2013 +0400

----------------------------------------------------------------------
 share/doc/src/couchapp/views/joins.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2a42ed58/share/doc/src/couchapp/views/joins.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/couchapp/views/joins.rst b/share/doc/src/couchapp/views/joins.rst
index 392bf5b..3abae9d 100644
--- a/share/doc/src/couchapp/views/joins.rst
+++ b/share/doc/src/couchapp/views/joins.rst
@@ -208,7 +208,7 @@ all blog posts, keyed by author:
 
   function(doc) {
     for (var i in doc.comments) {
-      map(doc.comments[i].author, doc.comments[i].content);
+      emit(doc.comments[i].author, doc.comments[i].content);
     }
   }
 
@@ -286,7 +286,7 @@ ID:
 
   function(doc) {
     if (doc.type == "comment") {
-      map(doc.post, {author: doc.author, content: doc.content});
+      emit(doc.post, {author: doc.author, content: doc.content});
     }
   }
 
@@ -299,7 +299,7 @@ Viewing all comments by author is just as easy as before:
 
   function(doc) {
     if (doc.type == "comment") {
-      map(doc.author, {post: doc.post, content: doc.content});
+      emit(doc.author, {post: doc.post, content: doc.content});
     }
   }
 
@@ -332,9 +332,9 @@ some use of that:
 
   function(doc) {
     if (doc.type == "post") {
-      map([doc._id, 0], doc);
+      emit([doc._id, 0], doc);
     } else if (doc.type == "comment") {
-      map([doc.post, 1], doc);
+      emit([doc.post, 1], doc);
     }
   }
 


Mime
View raw message