couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: Exist test?
Date Mon, 05 Nov 2012 23:08:42 GMT
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