You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Hank Knight <hk...@gmail.com> on 2013/11/03 21:08:47 UTC

CouchDB: Add document through update handler

I created an Update Handler that works great for updating existing
documents  I want it to continue updating existing documents however
if the document does not already exist I want it to be created.

Is there a way to make an update handler create a document if the
document it is requested to update does not exist?

Re: CouchDB: Add document through update handler

Posted by Hank Knight <hk...@gmail.com>.
Got it, thanks.

On Sun, Nov 3, 2013 at 4:14 PM, Robert Newson <rn...@apache.org> wrote:
> Yes, see the examples in the test suite's update_documents.js.
>
> B.
>
>
> On 3 November 2013 20:08, Hank Knight <hk...@gmail.com> wrote:
>> I created an Update Handler that works great for updating existing
>> documents  I want it to continue updating existing documents however
>> if the document does not already exist I want it to be created.
>>
>> Is there a way to make an update handler create a document if the
>> document it is requested to update does not exist?

Re: CouchDB: Add document through update handler

Posted by Robert Newson <rn...@apache.org>.
Yes, see the examples in the test suite's update_documents.js.

B.


On 3 November 2013 20:08, Hank Knight <hk...@gmail.com> wrote:
> I created an Update Handler that works great for updating existing
> documents  I want it to continue updating existing documents however
> if the document does not already exist I want it to be created.
>
> Is there a way to make an update handler create a document if the
> document it is requested to update does not exist?