incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Wall" <>
Subject Re: extra information in design documents
Date Wed, 03 Sep 2008 13:39:41 GMT
Sometimes I find myself keeping a "template" copy of a document in couchdb.
I find the lack of validation in couchdb freeing myself. Just use a template
copy of the document and fill in the blanks as needed.

But most often I find myself just using it as an object store for the
objects I have in the code. All validation occurs before I send. And since
document storage and updates are atomic in couchdb I can be confident that
what I validated gets stored.

All of that being said I don't think couch would balk if you stored
additional data in a design document. I haven't tried it but I would imagine
that it's just a document internally and adding extra fields should just
work. Have you tried to do so already and it failed?

On Wed, Sep 3, 2008 at 6:34 AM, Chris Farmiloe <> wrote:

> firstly:
> Hello list!
> secondly:
> I'm toying with some ideas using couchdb... and keep finding myself with a
> design-document for holding views and another documents describing something
> about by document "type".
> for example:
> I might have a validation-document for all my documents I have with
> 'type=note', it may contain a js function to run that will declare something
> as valid/invalid.
> I would then also have a design-document for my documents of 'type=note',
> containing my various map/reduces related to these docs.
> so...
> Could I store other fields on _design documents?
> using the example above: placing my "validation" function into the design
> doc.
> If not recommended, are others doing anything similar?
> Regards
> Chris Farmiloe

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message