You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Eric Casteleijn <er...@canonical.com> on 2010/11/10 18:06:34 UTC
Design document "versioning".
Hi,
When using couchdb views it would be very useful to be able to see when
the version of a design document in the database needs to be updated.
Right now, I've solved this in a very inefficient way: Every time I call
a view, I first query the design document it lives in, and compare the
version number (a field I've added) of the design doc, to what the
application has in its version on disk, and if the two are out of date
(or if the design document is not there at all yet) I PUT the version
the application has.
It would be very useful if version_number (or a field like it) was made
an official field, and output along with any view results, something like:
{
'design_document_version': '0.1',
'rows': [...]
}
so that one could just call the view, and compare version numbers after
the fact, and most of the time only a single call needs to be made.
Do others think this is a good idea?
--
eric casteleijn
https://code.launchpad.net/~thisfred
Canonical Ltd.