incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <rkevinbur...@charter.net>
Subject Re: Exist test?
Date Tue, 06 Nov 2012 00:45:02 GMT
Sorry but how do I send a "HEAD with the id I create"?

On Nov 5, 2012, at 5:08 PM, Benoit Chesneau <bchesneau@gmail.com> wrote:

> You can send an HEAD with the the id you will create. It is a cheap
> way to do it. However it is generally faster to just try and see what
> happen. If you generate good doc ids it will likely happen.
> 
> On Mon, Nov 5, 2012 at 7:22 PM, Kevin Burton <rkevinburton@charter.net> wrote:
>> I am calling CreateDocument<Document>() but I suspect that testing if the document
exists first may perform better in the long run. I am using DreamSeat for my driver but I
suspect other drivers have a similar "test". My problem is that I don't know what to test
for and I am unfamiliar with the available methods. Any one successfully use such a pattern
(preferably with DreamSeat) that tests for existence then creates if the document doesn't
exist? Keep in mind I don't initially have an id. Thank you.
>> 

Mime
View raw message