couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Minařík (JIRA) <j...@apache.org>
Subject [jira] Created: (COUCHDB-599) `head.total_rows` returns empty in a _list function
Date Mon, 14 Dec 2009 11:31:18 GMT
`head.total_rows` returns empty in a _list function
---------------------------------------------------

                 Key: COUCHDB-599
                 URL: https://issues.apache.org/jira/browse/COUCHDB-599
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core, Test Suite
    Affects Versions: 0.10, 0.11
         Environment: Mac OS X 10.5.8, Mac Book Air, CouchDB 0.10.0 (mac ports) and trunk
            Reporter: Karel Minařík


In a _list function defined like this:

  function (head, req) {
    return 'Total: ' + head.total_rows;
  }

the `head.total_rows` is undefined. 

I have created a test case for the issue in this patch (against Git repo at github.com/apache/couchdb):

--> http://gist.github.com/255972#file_couchdb_head_total_rows_in_list__fail.diff

See the map/reduce and list function definition in the gist, also the full db dump is included.

This fails fo me on CouchDB 0.10.0 and 0.11.0b77473d79-git.

There are tests for `head.total_rows` commented out in In the test cases (list_views.js, see
http://github.com/apache/couchdb/blob/trunk/share/www/script/test/list_views.js#L65-68 and
http://github.com/apache/couchdb/blob/trunk/share/www/script/test/list_views.js#L265)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message