Update handlers can still fail with a 409. :)

B.


On 8 November 2013 21:40, Stanley Iriele <siriele...@gmail.com> wrote:
> But no you can't just throw a doc in the db without the latest revision if
> it already exists
> On Nov 8, 2013 1:39 PM, "Stanley Iriele" <siriele...@gmail.com> wrote:
>
>> I still think you can use update handlers for that...just send the doc
>> over the wire... Parse it and save it in the db with the current revision
>> of the current doc if it exists...you. Can't do this in bulk... And I think
>> what you're trying to Dave is the round trip... Which the update handler
>> gives you...
>> On Nov 8, 2013 12:54 PM, "Daniel Nephin" <dnep...@gmail.com> wrote:
>>
>>> Isn't this the default behaviour?
>>>
>>> All you need to update a document is it's '_id'.  Since this is a data
>>> warehouse, I assume the ID is already being set by the transaction system,
>>> so you don't need to do a lookup. If you PUT a document (
>>> http://docs.couchdb.org/en/latest/api/document/common.html#put--db-docid)
>>> using
>>> it's ID, it will replace the previous revision.
>>>
>>> Am I missing something?
>>>
>>>
>>> On Fri, Nov 8, 2013 at 11:33 AM, Robert Newson <rnew...@apache.org>
>>> wrote:
>>>
>>> > There is not, not even update handlers can do that, by design.
>>> >
>>> > B.
>>> >
>>> >
>>> > On 8 November 2013 17:41, Stanley Iriele <siriele...@gmail.com> wrote:
>>> > > Update handlers sound like the way to go here....
>>> > > On Nov 8, 2013 9:39 AM, "Alex Ramos" <i2...@alexramos.net> wrote:
>>> > >
>>> > >> Is there any way to unconditionally overwrite a document without
>>> first
>>> > >> making a round-trip to get the current rev?
>>> > >>
>>> > >> I'm trying to use CouchDB as a data warehouse of sorts and I just
>>> need
>>> > to
>>> > >> overwrite docs with data coming from the transactional system of
>>> record
>>> > (in
>>> > >> MySQL) when they change.
>>> > >>
>>> >
>>>
>>

Reply via email to