couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ara.t.howard" <ara.t.how...@gmail.com>
Subject Re: Changing rev to _rev in view results (Was: Re: newbie question #1)
Date Sun, 04 Jan 2009 17:09:54 GMT

On Jan 4, 2009, at 9:35 AM, Michael Fellinger wrote:

> For what it's worth, I'd love to see a separation of data and data
> about data, and I'd also like to propose a change to map functions:
>
> function(doc, meta){ emit(doc.title, [meta.id, meta.ref]); }
> function(doc){ emit(doc.title); }
>
> That way people who are complaining about having to type doc.doc.title
> can have their peace of mind as well.
>
> I might see the whole issue very limited, but it makes absolutely the
> most sense to me, everybody can stop worrying about which data is
> allowed in the data part and the metadata can grow in any direction.
> Nobody is annoyed by prefixing _ anymore (symetric API) and there is
> little technical need anymore for validating documents (as long as
> they can be serialized to valid JSON) before putting them into the db.
>
> ^ manveru



i think those of us who have maintained a lot of code ourselves see  
the wisdom in this.  having rules that are 100% consistent lifts a  
massive mental weight for anyone connected to the code.

keys.each do |key|
   unless key =~ %r/^_/
     ...


just gives me hives to think about.

a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama




Mime
View raw message