From 2cf4fec22fa7214b11363eb7430c411e0afa6221 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sat, 1 Aug 2009 11:16:36 +0000 Subject: 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 --- src/couchdb/couch_httpd_show.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/couchdb/couch_httpd_show.erl') 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 -- cgit v1.2.3