nickva commented on code in PR #4394:
URL: https://github.com/apache/couchdb/pull/4394#discussion_r1081514712
##########
src/mango/src/mango_cursor_view.erl:
##########
@@ -35,6 +35,19 @@
-define(HEARTBEAT_INTERVAL_IN_USEC, 4000000).
+% viewcbargs wraps up the arguments that view_cb uses into a single
+% entry in the mrargs.extra list. We use a Map to allow us to later
+% add fields without having old messages causing errors/crashes.
+viewcbargs_new(Selector, Fields) ->
+ #{
+ selector => Selector,
+ fields => Fields
+ }.
+viewcbargs_get(selector, Args) when is_map(Args) ->
Review Comment:
Another alternative we typically use is `viewcbargs_get(selector, #{} =
Args)` but either way if fine.
--
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]