couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Iriele <siriele...@gmail.com>
Subject Re: Pulling more docs into update handler
Date Wed, 16 Oct 2013 02:34:16 GMT
I think I understand that...but from my standpoint (which could be totally
wrong) and update handler draws the latest doc from the db when it can
anyway..do if the second doc is not there that'd is totally fine...having
the ability to pull up 2 docs saves a view/list call with and a round trip.

Ultimately what gets committed to disk is the first entry in the array that
gets returned whatever it is.

But I do see your point I just thought it would be neat.... I may write a
plugin to do this because it seems pretty snazzy
That would violate our fundamental approach that a document stands alone
(that we make no promises about *other* documents contents or even
presence).

B.

On 15 Oct 2013, at 21:56, Stanley Iriele <siriele2x3@gmail.com> wrote:

> How bad of an idea would it be to add some parameter like include_doc to
> the update_handler that takes a doc Id..and that doc I'd gets included in
> the parameters.
>
> So the the method signature would be.
>
> function ( doc, req, included)
>
> Where included is either one doc or an array or docs....( depending on how
> it gets implemented).
>
> I just think it would be invaluable to have such power in an update
> handler.. But honestly one doc would be enough for me

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message