Skip to content

lists.withRows returns single record #2

@Masatoshi

Description

@Masatoshi

i think it should be below.

// Helpers for writing server-side _list functions in CouchDB
exports.withRows = function(fun) {
  var f = function() {
    var l = [];
    while (row = getRow()){
        l.push(fun(row));
    }
    return l;
  };
  f.iterator = true;
  return f;
}
exports.send = function(chunk) {
  send(chunk + "\n")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions