Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-2647

Named function in design fails to evaluate.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • JavaScript View Server
    • None

    Description

      When a named function is used for a design function, the server
      generates a Error: compilation_error.

      To reproduce this, create a view function that has a map function that
      looks like this:

      function name(doc) {
        emit(doc._id, doc);
      }
      

      This can be mitigated by not uploading named functions of course,
      but sometimes this is harder than it seems (when using libraries to
      do the uploading for example).

      Also, named functions are technically equivalent to anonymous functions
      so they should work.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              romeovs Romeo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: