incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <kocol...@apache.org>
Subject Re: Document availability in <db>/_all_docs
Date Thu, 25 Mar 2010 00:43:39 GMT
On Mar 24, 2010, at 4:18 PM, Chris Stockton wrote:

> Hello,
> 
> We have certain types of design documents within a database that
> contain properties with values which must be unique. These design
> documents are named in such a way I may do a _all_docs call to
> retrieve them. I then check the _all_docs call (with include_docs =
> true) to make sure when saving a new design document of this specific
> type that the property does not exist.
> 
> I understand and accept that it is possible between the check, and the
> actual PUT to the server, another document is saved, this is okay and
> I am designing for this. The resolution model we would like to follow
> is to rename the last saved document to preserve uniqueness. Our plan
> is after each document save, then see if more then one exists, if so,
> rename our document.
> 
> The only question this leaves, is after a document insert, is it then
> immediately available to _all_docs?

Yes, you'll always see it in _all_docs.  Best,

Adam


Mime
View raw message