Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couchbase

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchbase - npm Package Compare versions

Comparing version 1.0.0-beta to 1.0.0

4

benchmarks/bench.js

@@ -10,3 +10,3 @@ /* Bench.js

var couchbase = require('../lib/couchbase.js'),
cb_config = { hosts : [ "localhost:8091" ],
cb_config = { host : [ "localhost:8091" ],
bucket : "default"

@@ -145,3 +145,3 @@ },

(function(id) {
couchbase.connect(cb_config, function(err, client) {
var client = new couchbase.Connection(cb_config, function(err) {
if(err) {

@@ -148,0 +148,0 @@ console.log("ERR: Unable to connect to Server");

@@ -256,4 +256,4 @@ 'use strict';

}
}
}
};
};

@@ -347,3 +347,3 @@ /** Common entry point for single-key storage functions.

this._interceptEndure(key, kdict, {}, false, callback));
}
};

@@ -780,3 +780,3 @@ /**

Connection.prototype.addMulti = function(kv, meta, callback) {
this._multiHelper(this._cb.addMulti, arguments)
this._multiHelper(this._cb.addMulti, arguments);
};

@@ -894,3 +894,3 @@

this._multiHelper(this._cb.incrMulti, arguments);
}
};

@@ -910,3 +910,3 @@ /**

this._multiHelper(this._cb.decrMulti, arguments);
}
};

@@ -953,3 +953,3 @@ /**

this._cb.stats(key, null, callback);
}
};

@@ -984,3 +984,3 @@ /**

this._cb.httpRequest(params, null, callback);
}
};

@@ -1111,3 +1111,3 @@ // Initialize

return this._cb.strError(code);
}
};

@@ -1193,3 +1193,3 @@

// Libcouchbase codes:
success: 0,
success: CONST.LCB_SUCCESS,
authContinue: CONST.LCB_AUTH_CONTINUE,

@@ -1196,0 +1196,0 @@ authError: CONST.LCB_AUTH_ERROR,

@@ -26,5 +26,11 @@ 'use strict';

if (body.debug_info) {
// if debug information is returned, log it for the user
console.log('View Debugging Information Returned: ', body.debug_info);
}
// This should probably be updated to act differently
var errObj = null;
if (body && body.error) {
var errObj = new Error("REST error " + body.error);
errObj = new Error("REST error " + body.error);
errObj.code = 9999;

@@ -34,12 +40,22 @@ if (body.reason) {

}
innerCallback(errObj, null);
} else {
if (body.rows) {
innerCallback(null, body.rows);
} else if (body.results) {
innerCallback(null, body.results);
} else {
innerCallback(null, body);
}
if (body && body.errors) {
errObj = [];
for (var i = 0; i < body.errors.length; ++i) {
var tmpErrObj = new Error("REST error " + body.errors[i]);
tmpErrObj.code = 9999;
if (body.errors[i].reason) {
tmpErrObj.reason = body.errors[i].reason;
}
errObj.push(tmpErrObj);
}
}
if (body.rows) {
innerCallback(errObj, body.rows);
} else if (body.results) {
innerCallback(errObj, body.results);
} else {
innerCallback(errObj, null);
}
};

@@ -46,0 +62,0 @@ return ret;

@@ -20,4 +20,4 @@ {

"repository" : { "type" : "git", "url" : "http://github.com/couchbase/couchnode.git" },
"version": "1.0.0-beta",
"version": "1.0.0",
"gypfile": true
}

@@ -5,3 +5,3 @@ var harness = require('./harness.js');

harness.plan(9);
harness.plan(10);
var H = new harness.Harness();

@@ -98,2 +98,17 @@

}))
}();
var testFlagOverride = function() {
var value = {val:"value"};
var cb = H.client;
var key = H.genKey("test-flags-override");
// Note that we must specify the format as the flags no longer is carrying it
cb.set(key, value, {flags: 14}, H.okCallback(function(){
cb.get(key, {format: couchbase.format.json}, H.okCallback(function(result){
assert.deepEqual(result.value, value);
assert.equal(result.flags, 14);
harness.end(0);
}));
}));
}();
var harness = require('./harness.js'),
assert = require('assert');
assert = require('assert'),
couchbase = require('../lib/couchbase.js');

@@ -7,3 +8,3 @@ var H = new harness.Harness();

harness.plan(1);
harness.plan(2);

@@ -51,1 +52,27 @@

}();
var testNoSuchKeyErrorSpooled = function() {
var H = new harness.Harness();
var c = H.client;
var badKey = H.genKey("test-multiget-error");
var goodKey = H.genKey("test-multiget-spooled");
var goodValue = 'foo';
c.set(goodKey, goodValue, function(err, meta) {
assert.ifError(err);
var keys = [badKey, goodKey];
c.getMulti(keys, null, function(err, meta) {
assert.strictEqual(err.code, couchbase.errors.checkResults);
var goodResult = meta[goodKey];
assert.equal(goodResult.value, goodValue);
var badResult = meta[badKey];
assert.strictEqual(badResult.error.code, couchbase.errors.keyNotFound);
harness.end(0);
});
});
}();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc