couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Young (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1303) Add a _bulk_update handler similar to _update but for bulk document changes
Date Mon, 09 Dec 2013 14:46:07 GMT


Benjamin Young commented on COUCHDB-1303:

Yeah, that needs exploration, discussion, etc. There'd certainly be value in {{_update}} (or
similar) handling multiple document saving. Likely, there'd need to be ways to do some or
all of the following:
a. report per-doc failure info
b. handle document-saving in the function (this seems like a Bad Thing due to blocking the
c. provide an "all or nothing" style feature (or make it mandatory, maybe) where nothing gets
stored if they all can't be stored.

Does {{validate_doc_update}} run on {{_update}}?
Are conflicts the key issue (as we'd not have read any previous docs prior to write-attempts
in the mentioned setup at least)?

The error condition handling is where the complexity/bloat/etc will ever...

> Add a _bulk_update handler similar to _update but for bulk document changes
> ---------------------------------------------------------------------------
>                 Key: COUCHDB-1303
>                 URL:
>             Project: CouchDB
>          Issue Type: New Feature
>            Reporter: Benjamin Young
>              Labels: api, update_request_handler
> _update handlers are great (and getting better!) for building RESTful API's inside CouchDB.
One limitation I found tonight is that _update can only do a single document at a time. If
the API I'm building needs to update multiple docs (in a similar fashion to _bulk_docs), then
an outside "proxy" script is required. It would be ideal to have a _bulk_update handler to
allow for the same functionality as _update, but with the ability to insert multiple documents
at once.
> Perhaps the current _update handler API could be extended to support multiple IDs/documents,
but a separate API endpoint would be seem reasonable if needed.
> Thanks for considering this idea.

This message was sent by Atlassian JIRA

View raw message