couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Casteleijn <>
Subject Design document "versioning".
Date Wed, 10 Nov 2010 17:06:34 GMT

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
Canonical Ltd.

View raw message