You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Travis Jensen <tr...@gmail.com> on 2011/04/05 00:07:00 UTC

Re-writing content on save

http://wiki.apache.org/couchdb/How_to_intercept_document_updates_and_perform_additional_server-side_processing
hasn't
been written. I need to save a portion of the document as encrypted. How can
I insert my code in between the put and the actual save (and vice-versa for
reading) to do said encryption/decryption?

Thanks.

tj

-- 
*Travis Jensen*
***
*Read the Software Maven @ http://softwaremaven.innerbrane.com/
Read my LinkedIn profile @ http://www.linkedin.com/in/travisjensen
Read my Twitter mumblings @ http://twitter.com/SoftwareMaven
Send me email @ travis.jensen@gmail.com

**What kind of guy calls himself the Software Maven???**

Re: Re-writing content on save

Posted by Luciano Ramalho <lu...@ramalho.org>.
On Mon, Apr 4, 2011 at 7:07 PM, Travis Jensen <tr...@gmail.com> wrote:
> http://wiki.apache.org/couchdb/How_to_intercept_document_updates_and_perform_additional_server-side_processing
> hasn't
> been written. I need to save a portion of the document as encrypted. How can
> I insert my code in between the put and the actual save (and vice-versa for
> reading) to do said encryption/decryption?

For encrypting on write, you can use an update handler, as described here:

http://wiki.apache.org/couchdb/Document_Update_Handlers

For decrypting on read, you can use a show function:

http://wiki.apache.org/couchdb/Formatting_with_Show_and_List

Cheers,

-- 
Luciano Ramalho
programador repentista || stand-up programmer
Twitter: @luciano