couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren New <>
Subject Re: Optionally including docs in view results
Date Wed, 06 Aug 2008 15:29:57 GMT
Tom Wright wrote:
> _bulk_get
> _bulk_insert
> _bulk_update
> _bulk_delete

It might be useful, also, to think in terms of a meta-level of naming, 
even inside the JSON. For example, if documents are modified with a PUT, 
then rather than having _bulk_docs take an array with a tag of "docs" on 
it, have _bulk_docs take an array with a tag of "PUT" on it. In other 
words, have a one-to-one mapping from the RESTful interface to the 
_bulk* interface(s), rather than having each operation be ad hoc.

I've found in the past this makes things (a) much easier to describe and 
learn and (b) much easier to extend.

Something like setting the deleted flag=true to delete it in bulk docs 
and using a different verb in REST is the sort of thing that leads to 
needing _tag syntax in the first place.

Just a thought on the design.

Darren New / San Diego, CA, USA (PST)
  Ever notice how people in a zombie movie never already know how to
  kill zombies? Ask 100 random people in America how to kill someone
  who has reanimated from the dead in a secret viral weapons lab,
  and how many do you think already know you need a head-shot?

View raw message