mikerhodes commented on code in PR #4394:
URL: https://github.com/apache/couchdb/pull/4394#discussion_r1082305003
##########
src/mango/src/mango_cursor_view.erl:
##########
@@ -441,7 +496,12 @@ doc_member(Cursor, RowProps) ->
case mango_util:defer(fabric, open_doc, [Db, Id, Opts]) of
{ok, #doc{} = DocProps} ->
Doc = couch_doc:to_json_obj(DocProps, []),
- match_doc(Selector, Doc, ExecutionStats1);
+ case match_and_extract_doc(Doc, Selector,
Cursor#cursor.fields) of
+ {match, FinalDoc} ->
+ {ok, FinalDoc, {execution_stats, ExecutionStats1}};
+ {no_match, _} ->
Review Comment:
There's no reason to leave it unspecified. I wasn't sure whether to go for
more "fixed" pattern matching or be freer, so I'm more than happy to change.
I'll update and squash in a new commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]