| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Co-Authored-By: Paul J. Davis <paul.joseph.davis@gmail.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add `log` as another option for `query_config.reduce_limit` instead of `true`
or `false` only. This warns user without crashing the view.
Account for reduce functions code size when checking for overlflow. Code size
was previously implicitly included in input size, skewing the result of
overflow check.
Increase threshold for overflow check. Before it was only 200. This
should prevent false positives in case users have a large accumulator object to
collect various stats.
Jira: COUCHDB-3046
|
| | |
|
| | |
|
| |
|
|
| |
COUCHDB-2874
|
| |
|
|
| |
Signed-off-by: Alexander Shorin <kxepal@apache.org>
|
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
couchjs/js/SConscript
share/server/json2.js
share/server/render.js
share/server/util.js
|
| | |
| |
| |
| | |
and better looping.
|
| |/
|
|
|
|
|
|
| |
Object.toSource is [non-standard][0] and missing in v8 and probably
other javascript VMs. Its better to chop it off now that feel pain later
if we'll decide to move to different javascript engine.
[0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toSource
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently calls to getRow() cause the HTTP headers to be sent immediately back
to the client. This happens even if an error is thrown after the getRow(), but
before any send(...) or start(...). Worse, if a list throws an exception an
extra, invalid header is sent to the client (resulting in various bad
behavior).
Erlang list handling will now wait until data has been sent BEFORE sending the
HTTP headers to the client. If an error is reported it will result in an HTTP
error code as expected. This does not change the behavior of errors thrown
AFTER data has been sent: They will still result in an HTTP 200 even if an
error is reported.
The line protocol between Erlang and os processes has been extended to support
an optional Header field on "chunks" and "end". The javascript list handling
has been updated to use this if a new header is set via start(...). This makes
it possible to begin processing with getRow(), but later reset the headers via
start(...). Again, if data has been sent(...) the new headers will NOT take
effect.
COUCHDB-430
COUCHDB-514
COUCHDB-764
|
| |
|
|
| |
Fix failed loading of CommonJS modules that end in a line comment.
|
| | |
|
| |
|
|
|
|
|
| |
Adds an optional third argument to the `evalcx` function in the JS view
server to pass a filename for display in stacktraces for `Error`
objects. Updates the CommonJS support to use this when `require`ing
modules.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
couchjs:
- report stacktraces on exceptions using JS_ReportError
- responds with a trace and message on errors when possible
- propogate Error-like objects from validate_doc_update to the loop
- make Error-like object play nicely with couch_os_process
couch.js:
- transform HTTP error response bodies into an Error instance to
capture stack information
cli tests:
- print a stacktrace for individual test failures when running the suite
Fix COUCHDB-111
Fix COUCHDB-1389
|
| |
|
|
| |
This reverts commit 293ae2236859629a6dabc3727d0ccca977b8a8f8.
|
| |
|
|
|
|
|
|
|
|
|
| |
We were making a typical JavaScript mistake testing a module for
truthiness instead of checking that it was undefined.
Fixes COUCHDB-1223
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1176677 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found this error using the Debian package for SM 1.8.5 and have since
had reports of users seeing it as well. The basic error is that some
versions of SpiderMonkey appear to dislike this call to eval:
eval("function(){}");
The fix is simply to wrap the function source in parenthesis so that
SM is convinced that it knows how to evaluate a function.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1176666 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
| |
Also fix ignoring the return value when the send() API isnused.
Patch by Alexander Shorin.
Closes COUCHDB-1272
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1166623 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent patch to enable support for SM 1.8.5 broke support for
1.7.0. This patch updates couchjs to work with all of the major
variants of Spidermonkey.
Versions tested:
1.7.0
1.8.0rc1
1.8.5
1.9.2.something (XULRunner)
Various combinations have been tested on OS X, Ubuntu, FreeBSD and
Windows.
Fixes COUCHDB-1260
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1164346 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to write all query server functions in CoffeeScript.
The implementation re-uses the JS query server and adds an additional,
optional compilation step. To make the implementation easier for now,
a new main-coffee.js file is generated that includes the CoffeeScript
compiler, but I think we can do away with that in a future optimisation
and just use a single main.js that can handle both.
The patch includes basic tests for the JS test suite that I tested
in Firefox and Chrome. I'm no expert in CoffeeScript, so I don't
know if more complex script will break the implementation. `make
distcheck` passes.
Futon picks up the "coffeescript" design document lanugage as expected
and view definition interaction works as usual.
List functions don't deal well with the implicit return generated by
CoffeeScript, but J Chris says, this will be easy to fix.
The patch adds CoffeeScript 1.1.1 which is MIT licensed and updates
the NOTICE, LICENSE, license.skip and .gitignore files as well as the
build system accordingly.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1129600 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
| |
Thanks to Caolan McMahon for the patch.
Closes COUCHDB-1075
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1102006 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In show and list functions in the Javascript query server, the this
member is a reference to the design doc object. The same should be true
in the functions registered by Mime.provides(), for consistency.
Closes COUCHDB-959
Patch by Tim Smith.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1094137 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
| |
Closes COUCHDB-1109.
Patch by Thomas Vander Stichele, thanks.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1086598 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
duplicating the
effort in writing a filter function that does the same, which is
apparently done a lot.
Each time a value could be emitted, a change is returned. The url is :
http://127.0.0.1:5984/testdb/_changes?filter=_view&view=dname/viewname
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1053132 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
| |
Thanks Jason Smith for bringing this into attention.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1050621 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
| |
version, seal its members.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1039118 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
only).
This prevents one map function from modifying a document before it's passed to another map function.
Has no effect on array fields for some Spidermonkey versions (see https://bugzilla.mozilla.org/show_bug.cgi?id=449657).
Closes COUCHDB-925.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1038193 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
| |
Closes COUCHDB-790. Thanks Gabriel Farrell.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1037448 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1037266 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
| |
anonymous function declaration.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1037245 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
| |
obj, not doc.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1037213 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1037206 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
| |
Improve log(<xml/>);
Patch by Benjamin Young.
Closes COUCHDB-895.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1035104 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1001895 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@996266 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@966971 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
| |
COUCHDB-740
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@936889 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@934652 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@916076 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@911602 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@906755 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
| |
behaviour
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@906721 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
|
|
|
|
|
|
| |
This change makes us interoperate better with other JSON implementations. It also means we can use the native JSON handlers in JavaScript runtimes that support them. Should be faster right away on new Spidermonkeys.
There are some potential breaking changes for apps that depend on Couch blowing up on 'undefined'. json2.js serialized undefined as 'null' instead of crashing.
This change will also affect people using E4X, as you can't just return an XML object and have it serialized to a string for you. Calling .toXMLString() on these is all you need to do.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@903023 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@893364 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@893249 13f79535-47bb-0310-9956-ffa450edef68
|
| |
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@890008 13f79535-47bb-0310-9956-ffa450edef68
|