You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2010/04/18 07:27:05 UTC

[Couchdb Wiki] Update of "Document_Update_Handlers" by PaulBonser

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Document_Update_Handlers" page has been changed by PaulBonser.
The comment on this change is: When using update handlers, there's no document posted by the user. The document comes directly from the DB, based on the requested ID..
http://wiki.apache.org/couchdb/Document_Update_Handlers?action=diff&rev1=7&rev2=8

--------------------------------------------------

  
  == Basics ==
  
- CouchDB (0.10 and up) has the ability to allow server-side processing of an incoming document before it's committed. This feature allows a range of use cases such as providing a server-side last modified timestamp, etc.
+ CouchDB (0.10 and up) has the ability to allow server-side updating of a document without the usual GET-modify-POST cycle, or server-side creation of a new document based on parameters sent by the user. This feature allows a range of use cases such as providing a server-side last modified timestamp, updating individual fields in a document without first getting the latest revision, etc.
+ 
+ It's important to note that and update handler doesn't need to have an entire document sent to it, as it will be passed the server's current version of the requested document. In fact, any parameters passed to an update function, other than the document ID, have to be handled manually by the update function itself.
  
  == Implementation ==