mongodb-core
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,3 +0,7 @@ | ||
1.0.1 07-10-2014 | ||
1.0.3 21-10-2014 | ||
---------------- | ||
- fixed error issuing problem on cursor.next when iterating over a huge dataset with a very small batchSize. | ||
1.0.2 07-10-2014 | ||
---------------- | ||
- fullsetup is now defined as a primary and secondary being available allowing for all read preferences to be satisfied. | ||
@@ -4,0 +8,0 @@ - fixed issue with replset_state logging. |
@@ -89,2 +89,3 @@ var Long = require('bson').Long | ||
, init: false | ||
, notified: false | ||
, limit: options.limit || cmd.limit || 0 | ||
@@ -158,4 +159,15 @@ , skip: options.skip || cmd.skip || 0 | ||
this.next = function(callback) { | ||
// Cursor is killed return null | ||
if(cursorState.killed) return handleCallback(callback, null, null); | ||
if(cursorState.dead) return handleCallback(callback, new MongoError("cursor is dead")); | ||
// Cursor is dead but not marked killed, return null | ||
if(cursorState.dead && !cursorState.killed) { | ||
cursorState.killed = true; | ||
return handleCallback(callback, null, null); | ||
} | ||
// We have a dead and killed cursor, attempting to call next should error | ||
if(cursorState.dead && cursorState.killed) { | ||
return handleCallback(callback, new MongoError("cursor is dead")); | ||
} | ||
// We have just started the cursor | ||
@@ -162,0 +174,0 @@ if(!cursorState.init) { |
{ | ||
"name": "mongodb-core", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
338393
8678