Socket
Socket
Sign inDemoInstall

mongoose

Package Overview
Dependencies
Maintainers
0
Versions
883
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose - npm Package Compare versions

Comparing version 1.0.8 to 1.0.10

10

History.md
1.0.10 / 2011-02-11
===================
* Updated node-mongodb-native driver [thanks John Allen]
1.0.9 / 2011-02-09
==================
* Fixed single member arrays as defaults [brian]
1.0.8 / 2011-02-09

@@ -3,0 +13,0 @@ ==================

2

lib/mongoose/index.js

@@ -256,3 +256,3 @@

exports.version = '1.0.8';
exports.version = '1.0.10';

@@ -259,0 +259,0 @@ /**

@@ -46,4 +46,6 @@

SchemaType.prototype.default = function (val) {
if (arguments.length === 1){
this.defaultValue = val;
if (arguments.length === 1) {
this.defaultValue = (typeof val === 'function')
? val
: this.cast(val);
return this;

@@ -50,0 +52,0 @@ } else if (arguments.length > 1) {

{
"name": "mongoose"
, "description": "Mongoose MongoDB ORM"
, "version": "1.0.8"
, "version": "1.0.10"
, "author": "Guillermo Rauch <guillermo@learnboost.com>"

@@ -6,0 +6,0 @@ , "keywords": ["mongodb", "mongoose", "orm", "data", "datastore", "nosql"]

@@ -93,4 +93,4 @@ var InsertCommand = require('./commands/insert_command').InsertCommand,

var deleteCommand = new DeleteCommand(this.db, this.db.databaseName + "." + this.collectionName, removeSelector);
// Execute the command
this.db.executeCommand(deleteCommand, callback);
// Execute the command, do not add a callback as it's async
this.db.executeCommand(deleteCommand);
// If safe mode check last error

@@ -498,6 +498,14 @@ if(callback != null) {

self.db.collection(result.documents[0].result, function(err, collection) {
callback(err, collection);
if(options.include_statistics) {
var stats = {
processtime: result.documents[0].timeMillis,
counts: result.documents[0].counts
};
callback(err, collection, stats);
} else {
callback(err, collection);
}
});
} else {
err != null ? callback(err, null) : callback(new Error("map-reduce failed: " + result.documents[0].errmsg), null);
err != null ? callback(err, null, null) : callback(new Error("map-reduce failed: " + result.documents[0].errmsg), null, null);
}

@@ -504,0 +512,0 @@ });

@@ -388,3 +388,4 @@ var QueryCommand = require('./commands/query_command').QueryCommand,

} else if(Object.prototype.toString.call(this.sortValue) === '[object Object]') {
throw new Error("Invalid sort argument was supplied");
//throw new Error("Invalid sort argument was supplied");
return orderBy = this.sortValue;
} else if(this.sortValue.constructor == String) {

@@ -391,0 +392,0 @@ orderBy[this.sortValue] = 1

@@ -24,4 +24,9 @@ var QueryCommand = require('./commands/query_command').QueryCommand,

// Contains all the connections for the db
this.bson_serializer = this.options.native_parser ? require('../../external-libs/bson/bson') : require('./bson/bson');
this.bson_deserializer = this.options.native_parser ? require('../../external-libs/bson/bson') : require('./bson/bson');
try {
this.bson_serializer = this.options.native_parser ? require('../../external-libs/bson/bson') : require('./bson/bson');
this.bson_deserializer = this.options.native_parser ? require('../../external-libs/bson/bson') : require('./bson/bson');
} catch (err) {
// If we tried to instantiate the native driver
throw "Native bson parser not compiled, please compile or avoud using native_parser=true";
}
this.connections = [];

@@ -522,3 +527,2 @@ // State of the db connection

Db.prototype.dropDatabase = function(callback) {
this.executeCommand(DbCommand.createDropDatabaseCommand(this), function(err, result) {

@@ -525,0 +529,0 @@ callback(err, result);

var sys = require('sys')
// Add both the BSON Pure classes and the native ones
// // Add both the BSON Pure classes and the native ones
var BSONPure = exports.BSONPure = require('./bson/bson');

@@ -9,3 +9,2 @@ var BSONNative = null

} catch(err) {
sys.puts("native library not built")
}

@@ -12,0 +11,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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