incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano Ramalho <luci...@ramalho.org>
Subject Re: Re-writing content on save
Date Tue, 05 Apr 2011 02:50:28 GMT
On Mon, Apr 4, 2011 at 7:07 PM, Travis Jensen <travis.jensen@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

Mime
View raw message