You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benjamin Young (Created) (JIRA)" <ji...@apache.org> on 2011/10/14 03:58:11 UTC

[jira] [Created] (COUCHDB-1306) Allow

Allow 
------

                 Key: COUCHDB-1306
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1306
             Project: CouchDB
          Issue Type: Bug
            Reporter: Benjamin Young




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1306) Allow Booleans to be quoted in Rewrite rules

Posted by "Benoit Chesneau (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Chesneau updated COUCHDB-1306:
-------------------------------------

    Fix Version/s: 1.3
    
> Allow Booleans to be quoted in Rewrite rules
> --------------------------------------------
>
>                 Key: COUCHDB-1306
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1306
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1, 1.2
>            Reporter: Benjamin Young
>            Assignee: Benoit Chesneau
>              Labels: couchapp, rewriter
>             Fix For: 1.3
>
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1306) Allow Booleans to be quoted in Rewrite rules

Posted by "Benjamin Young (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Young updated COUCHDB-1306:
------------------------------------

          Skill Level: Regular Contributors Level (Easy to Medium)
               Labels: couchapp rewriter  (was: )
          Description: 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.
    Affects Version/s: 1.2
                       1.1
              Summary: Allow Booleans to be quoted in Rewrite rules  (was: Allow )
    
> Allow Booleans to be quoted in Rewrite rules
> --------------------------------------------
>
>                 Key: COUCHDB-1306
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1306
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1306) Allow Booleans to be quoted in Rewrite rules

Posted by "Benjamin Young (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128246#comment-13128246 ] 

Benjamin Young commented on COUCHDB-1306:
-----------------------------------------

The "breaks" part came from past, working CouchApps failing due to the COUCHDB-1074 patch. I understand reasoning behind the patch, but breaking past (and perfectly reasonable JSON) rewrite rules that include something like "descending: true" should be considered a bug, and ideally fixed. :)

If true booleans can no longer be supported in the rewriter, it would be great to at least throw something in the logs about why its failing. Otherwise, hours go quickly down the drain for something as simple as a pair of quotation marks...

It wouldn't be so bad if it weren't so frustrating to hunt down. :)
                
> Allow Booleans to be quoted in Rewrite rules
> --------------------------------------------
>
>                 Key: COUCHDB-1306
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1306
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1, 1.2
>            Reporter: Benjamin Young
>            Assignee: Benoit Chesneau
>              Labels: couchapp, rewriter
>             Fix For: 1.3
>
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1306) Allow Booleans to be unquoted in Rewrite rules

Posted by "Benjamin Young (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Young updated COUCHDB-1306:
------------------------------------

    Summary: Allow Booleans to be unquoted in Rewrite rules  (was: Allow Booleans to be quoted in Rewrite rules)
    
> Allow Booleans to be unquoted in Rewrite rules
> ----------------------------------------------
>
>                 Key: COUCHDB-1306
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1306
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1, 1.2
>            Reporter: Benjamin Young
>            Assignee: Benoit Chesneau
>              Labels: couchapp, rewriter
>             Fix For: 1.3
>
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1306) Allow Booleans to be quoted in Rewrite rules

Posted by "Benoit Chesneau (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128173#comment-13128173 ] 

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 argument.

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 :

eg:
?key=%5B1%2C2%5D

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 it.

                
> Allow Booleans to be quoted in Rewrite rules
> --------------------------------------------
>
>                 Key: COUCHDB-1306
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1306
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (COUCHDB-1306) Allow Booleans to be quoted in Rewrite rules

Posted by "Benoit Chesneau (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Chesneau reassigned COUCHDB-1306:
----------------------------------------

    Assignee: Benoit Chesneau
    
> Allow Booleans to be quoted in Rewrite rules
> --------------------------------------------
>
>                 Key: COUCHDB-1306
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1306
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.1, 1.2
>            Reporter: Benjamin Young
>            Assignee: Benoit Chesneau
>              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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira