couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walt W (JIRA)" <j...@apache.org>
Subject [jira] Created: (COUCHDB-729) View Generation: emit() not instantaneous
Date Thu, 08 Apr 2010 18:59:36 GMT
View Generation: emit() not instantaneous
-----------------------------------------

                 Key: COUCHDB-729
                 URL: https://issues.apache.org/jira/browse/COUCHDB-729
             Project: CouchDB
          Issue Type: Bug
          Components: JavaScript View Server
         Environment: Using Win7
            Reporter: Walt W


Try the following view function:

function(doc) {
  var tmp = { result: 'a' };
  emit(null, tmp);
  tmp.result = 'b';
  emit(null, tmp);
}

The unfortunate happening is that (null, { result: 'b' }) is emitted twice per document, rather
than one 'a' and one 'b'.  I would think that the emit function should grab and copy the values
passed immediately; it does not make sense or seem useful (to me anyway) to allow them to
change after the fact.

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