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

loopback-connector-mongodb

Package Overview
Dependencies
Maintainers
4
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loopback-connector-mongodb - npm Package Compare versions

Comparing version 1.4.5 to 1.5.0

example/model-inq.js

22

CHANGES.md

@@ -1,4 +0,10 @@

2014-11-27, Version 1.4.5
2015-01-14, Version 1.5.0
=========================
* Fix the test case (Raymond Feng)
* Upgrade to mongodb node driver 2.x (Raymond Feng)
* Fix bad CLA URL in CONTRIBUTING.md (Ryan Graham)
* test: Use mongodb on localhost under CI (Ryan Graham)

@@ -146,2 +152,6 @@

2014-03-18, Version 1.2.0
=========================
* Set default options for background/unique (Raymond Feng)

@@ -279,3 +289,3 @@

2013-09-05, Version strongloopsuite-1.0.0-0
2013-09-05, Version strongloopsuite-1.0.0-1
===========================================

@@ -285,11 +295,5 @@

2013-09-05, Version strongloopsuite-1.0.0-1
2013-09-05, Version strongloopsuite-1.0.0-0
===========================================
* Updated to use tagged version strongloopsuite-1.0.0-0 of dependencies (cgole)
2013-09-04, Version 1.2.0
=========================
* First release!

@@ -17,3 +17,3 @@ ### Contributing ###

* Sign the [Contributor License Agreement](https://cla.strongloop.com/strongloop/loopback-connector-mongodb)
* Sign the [Contributor License Agreement](https://cla.strongloop.com/agreements/strongloop/loopback-connector-mongodb)

@@ -20,0 +20,0 @@ * Submit a pull request through Github.

@@ -199,5 +199,5 @@ /*!

}
this.collection(model).insert(data, {safe: true}, function (err, m) {
this.collection(model).insert(data, {safe: true}, function (err, result) {
if (self.debug) {
debug('create.callback', model, err, m);
debug('create.callback', model, err, result);
}

@@ -207,3 +207,3 @@ if(err) {

}
idValue = m[0]._id;
idValue = result.ops[0]._id;
var modelClass = self._models[model];

@@ -251,3 +251,3 @@ var idType = modelClass.properties[idName].type;

}
callback && callback(err, result);
callback && callback(err, result.ops);
});

@@ -334,6 +334,7 @@ };

['_id', 'asc']
], {$set: data}, {upsert: true, new: true}, function (err, object) {
], {$set: data}, {upsert: true, new: true}, function (err, result) {
if (self.debug) {
debug('updateOrCreate.callback', model, id, err, object);
debug('updateOrCreate.callback', model, id, err, result);
}
var object = result.value;
if (!err && !object) {

@@ -365,3 +366,3 @@ // No result

}
callback && callback(err, result);
callback && callback(err, result.ops);
});

@@ -575,3 +576,4 @@ };

}
callback && callback(err, result);
var count = result && result.result && result.result.n || 0;
callback && callback(err, count);
});

@@ -618,6 +620,7 @@ };

['_id', 'asc']
], {$set: data}, {}, function (err, object) {
], {$set: data}, {}, function (err, result) {
if (self.debug) {
debug('updateAttributes.callback', model, id, err, object);
debug('updateAttributes.callback', model, id, err, result);
}
var object = result.value;
if (!err && !object) {

@@ -651,6 +654,7 @@ // No result

this.collection(model).update(where, {$set: data}, {multi: true, upsert: false},
function (err, count) {
function (err, result) {
if (self.debug) {
debug('updateAll.callback', model, where, data, err, count);
debug('updateAll.callback', model, where, data, err, result);
}
var count = result && result.result && result.result.n || 0;
cb && cb(err, count);

@@ -657,0 +661,0 @@ });

{
"name": "loopback-connector-mongodb",
"version": "1.4.5",
"version": "1.5.0",
"description": "LoopBack MongoDB Connector",

@@ -18,11 +18,11 @@ "keywords": [

"loopback-connector": "1.x",
"mongodb": "~1.4.7",
"async": "~0.9.0",
"debug": "~1.0.2"
"mongodb": "^2.0.13",
"async": "^0.9.0",
"debug": "^2.1.1"
},
"devDependencies": {
"loopback-datasource-juggler": "^2.10.2",
"loopback-datasource-juggler": "^2.13.0",
"should": "~1.2.2",
"mocha": "~1.20.1",
"rc": "~0.4.0"
"mocha": "^2.1.0",
"rc": "^0.5.5"
},

@@ -36,6 +36,3 @@ "repository": {

"url": "https://github.com/strongloop/loopback-connector-mongodb/blob/master/LICENSE"
},
"optionalDependencies": {
"sl-blip": "http://blip.strongloop.com/loopback-connector-mongodb@1.4.5"
}
}

@@ -91,3 +91,3 @@ // This test written in mocha+should.js

(!!err).should.be.true;
err.message.should.be.equal('failed to connect to [localhost:4]');
err.message.should.be.equal('connect ECONNREFUSED');
done();

@@ -128,3 +128,2 @@ });

should.not.exist(err);
should.not.exist(person.id);
person._id.should.be.equal(3);

@@ -144,3 +143,2 @@

should.not.exist(err);
should.not.exist(person.id);
person._id.should.be.equal(4);

@@ -147,0 +145,0 @@

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