summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_show.erl
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-08-01 11:16:36 +0000
committerJan Lehnardt <jan@apache.org>2009-08-01 11:16:36 +0000
commit2cf4fec22fa7214b11363eb7430c411e0afa6221 (patch)
treebca51ad663ea1392ce9b2b4dea6e05ccb6733c1f /src/couchdb/couch_httpd_show.erl
parenta05287f49dc20ef83f89668f1d2603174823565e (diff)
enable include_docs=true for list functions, patch by Mark Hammond, closes COUCHDB-444
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@799835 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_show.erl')
-rw-r--r--src/couchdb/couch_httpd_show.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/couchdb/couch_httpd_show.erl b/src/couchdb/couch_httpd_show.erl
index a73105b4..40f0dc11 100644
--- a/src/couchdb/couch_httpd_show.erl
+++ b/src/couchdb/couch_httpd_show.erl
@@ -207,18 +207,18 @@ start_list_resp(QueryServer, Req, Db, Head, Etag) ->
{ok, Resp, ?b2l(?l2b(Chunks))}.
make_map_send_row_fun(QueryServer) ->
- fun(Resp, Db, Row, _IncludeDocs, RowFront) ->
- send_list_row(Resp, QueryServer, Db, Row, RowFront)
+ fun(Resp, Db, Row, IncludeDocs, RowFront) ->
+ send_list_row(Resp, QueryServer, Db, Row, RowFront, IncludeDocs)
end.
make_reduce_send_row_fun(QueryServer, Db) ->
fun(Resp, Row, RowFront) ->
- send_list_row(Resp, QueryServer, Db, Row, RowFront)
+ send_list_row(Resp, QueryServer, Db, Row, RowFront, false)
end.
-send_list_row(Resp, QueryServer, Db, Row, RowFront) ->
+send_list_row(Resp, QueryServer, Db, Row, RowFront, IncludeDoc) ->
try
- [Go,Chunks] = couch_query_servers:render_list_row(QueryServer, Db, Row),
+ [Go,Chunks] = couch_query_servers:render_list_row(QueryServer, Db, Row, IncludeDoc),
Chunk = RowFront ++ ?b2l(?l2b(Chunks)),
send_non_empty_chunk(Resp, Chunk),
case Go of