couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Chesneau (Commented) (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1306) Allow Booleans to be quoted in Rewrite rules
Date Sat, 15 Oct 2011 13:23:11 GMT


Benoit Chesneau commented on COUCHDB-1306:

I don't like the term "breaks". "don't work like I expect it should" is more accurate here.
Strings are perfectly valid in json. 

The reasoning to use strings here is to handle miscellaneous strings coming from the query

While using json in query params of the rewrites members is perfectly feasible, it's different
when you have to handle strings coming from the query:

- a params may be a string sometimes or an array in a view, or maybe just a string in a view
too :


When you aren't rewriting a view. Should it be considered like [1,2] or "[1,2]" or ["1", "2"]

First implementations was considering that everything in the query was json values. It was
apparently a problem for some.

While I have some ideas to solve that, at some point using a format member to define the format
of a variable was the simplest and working way to solve that. That what does most of the rewriters
even with regexps anyway. (there is btw another implementation I posted on the ml that was
badly waiting for reviews ....).

I have some idea about the rewriter DSL anyway. Just need to connect the bits before posting

> Allow Booleans to be quoted in Rewrite rules
> --------------------------------------------
>                 Key: COUCHDB-1306
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1, 1.2
>            Reporter: Benjamin Young
>              Labels: couchapp, rewriter
> COUCHDB-1074 breaks the JSON format of Rewrite rules requiring that Boolean values always
be quoted. This requires additional knowledge for a user to even understand why their JSON
doesn't work with CouchDB.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message