couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: Database Disruption From The Couch
Date Wed, 11 Feb 2009 20:05:10 GMT
On Tue, Feb 10, 2009 at 04:26:21PM -0500, Dean Landolt wrote:
> > Again, I expect here that a single POST will only be able to update a
> > single
> > document. But the Rails-type way of doing nested parameters maps well to
> > JSON:
> >
> >   foo[bar]=hello       =>   {"foo":{"bar":"hello"}}
> >
> >   foo[bar][]=hello&foo[bar][]=world
> >
> >                        =>   {"foo":{"bar":["hello","world"]}}
> 
> 
> One doc update per POST seems pretty like a reasonable design constraint for
> now -- if you want more, you can always go server side. But that's a pretty
> sexy solution to form serialization I hadn't even considered. Is there some
> way to also differentiate numerics? If so, that's *perfect*.

Unfortunately not - in Rails you just get strings, and it's up to you to map
to numerics if you need them (or let ActiveRecord do that). Perhaps you
could add a some special symbol to the names, like foo#

There's also no provision for empty array or explicit null - but in couchdb,
the absence of an attribute is as good as that.

Mime
View raw message