incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <d...@muse.net.nz>
Subject Re: replication using an update handler?
Date Tue, 20 Dec 2011 20:57:48 GMT
On 20 December 2011 21:42, Jim Klo <jim.klo@sri.com> wrote:
> That's good - I was having a hard time understanding if that was source or destination.
>
> In my case we have multiple design docs in the same db.  Do all the validate_doc_update
functions (one in each design doc) get executed, or does one specifically get executed? if
the later how does selection happen?

All are run, and all must return true for the doc to be accepted.

> Also if I'm using CouchApp to push - do I just place a file named validate_doc_update.js
in the root of my app, or do I need to do that in the couchapp.json?

Yes.

These 2 links might be handy:
http://mindeavor.com/blog/the-anatomy-of-a-couchapp
https://github.com/jchris/couchapp.org/blob/master/validate_doc_update.js

A+
Dave

Mime
View raw message