diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-06-14 18:45:49 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-06-14 18:45:49 +0000 |
commit | cd39ebe7d12d999324ff2cc9842567b34dc4d4c7 (patch) | |
tree | 00bde7d855ba9cd07c2e5d0463dfd32c4f0badcc /share/server/loop.js | |
parent | 88fcbd2cdd14fedab900fbf3af3deb5fe15f4390 (diff) |
merge list-iterator branch to trunk. changes JavaScript _list API
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@784601 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/server/loop.js')
-rw-r--r-- | share/server/loop.js | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/share/server/loop.js b/share/server/loop.js index db6a9702..188692ba 100644 --- a/share/server/loop.js +++ b/share/server/loop.js @@ -21,6 +21,9 @@ try { sandbox.toJSON = toJSON; sandbox.respondWith = respondWith; sandbox.registerType = registerType; + sandbox.start = start; + sandbox.send = send; + sandbox.getRow = getRow; } catch (e) {} // Commands are in the form of json arrays: @@ -31,21 +34,19 @@ try { var line, cmd, cmdkey; var dispatch = { - "reset" : State.reset, - "add_fun" : State.addFun, - "map_doc" : Views.mapDoc, - "reduce" : Views.reduce, - "rereduce" : Views.rereduce, - "validate" : Validate.validate, - "show_doc" : Render.showDoc, - "list_begin" : Render.listBegin, - "list_row" : Render.listRow, - "list_tail" : Render.listTail + "reset" : State.reset, + "add_fun" : State.addFun, + "map_doc" : Views.mapDoc, + "reduce" : Views.reduce, + "rereduce" : Views.rereduce, + "validate" : Validate.validate, + "show" : Render.show, + "list" : Render.list }; while (line = eval(readline())) { - cmd = eval(line) - line_length = line.length + cmd = eval(line); + line_length = line.length; try { cmdkey = cmd.shift(); if (dispatch[cmdkey]) { |