Socket
Socket
Sign inDemoInstall

mongodb-core

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-core - npm Package Compare versions

Comparing version 1.1.21 to 1.1.22

5

HISTORY.md

@@ -0,1 +1,6 @@

1.1.22 04-10-2015
-----------------
- Minor refactorings in cursor code to make extending the cursor simpler.
- NODE-417 Resolution. Improving behavior of thrown errors using Error.captureStackTrace.
1.1.21 03-26-2015

@@ -2,0 +7,0 @@ -----------------

33

lib/cursor.js

@@ -437,9 +437,3 @@ "use strict";

/**
* Retrieve the next document from the cursor
* @method
* @param {resultCallback} callback A callback function
*/
Cursor.prototype.next = function(callback) {
var self = this;
var nextFunction = function(self, callback) {
// We have notified about it

@@ -456,3 +450,3 @@ if(self.cursorState.notified) return;

if(isCursorDeadAndKilled(self, callback)) return;
// We have just started the cursor

@@ -480,3 +474,3 @@ if(!self.cursorState.init) {

// Get the right wire protocol command
this.query = self.server.wireProtocolHandler.command(self.bson, self.ns, self.cmd, self.cursorState, self.topology, self.options);
self.query = self.server.wireProtocolHandler.command(self.bson, self.ns, self.cmd, self.cursorState, self.topology, self.options);
}

@@ -499,3 +493,3 @@

self.callbacks.unregister(self.query.requestId);
return self.next(callback);
return nextFunction(self, callback);
}

@@ -509,3 +503,3 @@

self.cursorState.cursorId = result.cursorId;
self.next(callback);
nextFunction(self, callback);
}

@@ -528,3 +522,3 @@ }

if(Long.ZERO.equals(self.cursorState.cursorId)) return;
self.next(callback);
nextFunction(self, callback);
}, 1);

@@ -546,3 +540,3 @@ }

self.next(callback);
nextFunction(self, callback);
});

@@ -581,3 +575,3 @@ } else if(self.cursorState.limit > 0 && self.cursorState.currentLimit >= self.cursorState.limit) {

self.next(callback);
nextFunction(self, callback);
});

@@ -612,5 +606,14 @@ } else if(self.cursorState.documents.length == self.cursorState.cursorIndex

handleCallback(callback, null, doc);
}
}
}
/**
* Retrieve the next document from the cursor
* @method
* @param {resultCallback} callback A callback function
*/
Cursor.prototype.next = function(callback) {
nextFunction(this, callback);
}
module.exports = Cursor;

@@ -13,3 +13,3 @@ "use strict";

this.message = message;
this.stack = (new Error()).stack;
Error.captureStackTrace(this, MongoError);
}

@@ -16,0 +16,0 @@

@@ -446,3 +446,2 @@ "use strict";

* @param {number} [options.socketTimeout=0] TCP Socket timeout setting
* @param {boolean} [options.singleBufferSerializtion=true] Serialize into single buffer, trade of peak memory for serialization speed
* @param {boolean} [options.ssl=false] Use SSL for connection

@@ -449,0 +448,0 @@ * @param {Buffer} [options.ca] SSL Certificate store binary buffer

@@ -46,3 +46,2 @@ "use strict";

if(options.serializeFunctions) opts.serializeFunctions = options.serializeFunctions;
// Execute command

@@ -49,0 +48,0 @@ topology.command(f("%s.$cmd", d), writeCommand, opts, callback);

{
"name": "mongodb-core",
"version": "1.1.21",
"version": "1.1.22",
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications",

@@ -5,0 +5,0 @@ "main": "index.js",

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