Convert libcouchbase error codes to standard NodeJS Error objects.

Change-Id: Ie414d055f5f3eafe10d71512ef61114a0dbb3a45
Reviewed-on: http://review.couchbase.org/22435
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Add support for createDesignDoc

Added ability to create design documents and associated viewsi
and updated unit test to reflect this change.

Change-Id: I3423f5d1129202353e034f7a8e99718c78f5f657
Reviewed-on: http://review.couchbase.org/22491
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Added the ability to get design documents via the REST api

Change-Id: I19c97f0ff0051eddcf7b5dbdc070c8818af9ecf8
Reviewed-on: http://review.couchbase.org/22515
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Rename delete to remove

delete is a keyword so it'll just make stuff harder

Change-Id: I70eef517462586eb9e202abbbede9fbcdf1a3357
Reviewed-on: http://review.couchbase.org/22516
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Fixup error handling

Added a list of errors ported from libcouchbase to allow easier
inspection of returned errors from couchnode.

Change-Id: I5f46f280110805931341ce81a26ef1db2205ab10
Reviewed-on: http://review.couchbase.org/22512
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Update plugin to conform recent libcouchbase

Change-Id: I50015817034470103c371536d58441189529dcfe
Reviewed-on: http://review.couchbase.org/22535
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Changed behaviour of get when called with multiple keys.

Get now spools the data from the server and calls the user-specified
callback only once when called with multiple keys. The old behaviour can
be emulated by calling get multiple times from the consumer side.

Change-Id: I1ed1b5331d5e2b42398983de130bf8fc7c69c2ee
Reviewed-on: http://review.couchbase.org/22518
Tested-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Made REST function return values more user-friendly.

Made the REST functions return the results of their calls rather than
an object that has the results in .results or .rows.

Change-Id: I9e3d1226f4511c2b02725213a9814dd3186a84d7
Reviewed-on: http://review.couchbase.org/22521
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Added fields missing from view querying code.

Change-Id: I77976cd5acf7ef25e4ad59d388ef176b8676ad33
Reviewed-on: http://review.couchbase.org/22529
Reviewed-by: Tugdual Grall <tugdual@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fixed bug where getDesignDoc was not accessible via the public API and had a bug.

Change-Id: I0129701cb542b04cef0b3400e473836f803fb05e
Reviewed-on: http://review.couchbase.org/22538
Reviewed-by: Tugdual Grall <tugdual@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Add test for JSCBC-4

Change-Id: Ic4f610d33fac69fc49284805f10ae5dd4fba0d8a
Reviewed-on: http://review.couchbase.org/22666
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Updated arithmetic callback to match form of other callbacks

ie: error, value, meta

Change-Id: Icbf5bd993aa6765f7329c7da67bc9c2d34248ac8
Reviewed-on: http://review.couchbase.org/22565
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Added ability to debug calls being made into couchnode via a config option

Change-Id: Iea01a9fd73b153ef619192409c52ef506f582450
Reviewed-on: http://review.couchbase.org/22566
Tested-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Update npm package version

Change-Id: Ibaa9682093ec674114590175ac30e31777b5e471
Reviewed-on: http://review.couchbase.org/22667
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix build on SmartOS

Change-Id: I06a034948483908304fcbd0931d4b337cb237d13
Reviewed-on: http://review.couchbase.org/22668
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Another npm release (previous had buildbreaks)

The previous release didn't build on SmartOS

Change-Id: Id133537cd65046765cecc8924a6e4897dcc32bee
Reviewed-on: http://review.couchbase.org/22669
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Implemented OBSERVE functionality.

Change-Id: I7d420f0769f9a2966abbe80cb25fe78afda83ddb
Implemented ENDURE (user-friendly version of OBSERVE)

Change-Id: I6d71deec127ee07114bbcfa4124b9d10072d7dca