incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@apache.org>
Subject Re: Document Updates
Date Fri, 14 Nov 2008 00:09:33 GMT
On Thu, Nov 13, 2008 at 3:37 PM, Noah Slater <nslater@apache.org> wrote:
>
> I did some digging to see what else is out there:
>
>  * http://intertwingly.net/blog/2008/02/21/APP-Level-Patch
>  * http://blog.mozilla.com/rob-sayre/2008/02/15/restful-partial-updates/
>  * http://www.snellspace.com/wp/?p=895
>  * http://lists.w3.org/Archives/Public/ietf-http-wg/2008JanMar/0316.html
>  * http://www.snellspace.com/wp/?p=902

Forgive me for throwing out a loose-cannon idea, but would it be
easiest to provide an API where the user sends a Javascript function
to CouchDB via the PATCH method? The function could look something
like:

function(doc) {
  doc.my_field = "new value";
  doc.existing_array[3] = "another new value";
  doc.new_array = ["a", "b", 3];
  return doc;
}

-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message