mongodb-core
Advanced tools
Comparing version 1.0.0-alpha3 to 1.0.0-alpha4
@@ -219,3 +219,3 @@ var inherits = require('util').inherits | ||
this.isConnected = function() { | ||
return !connection.destroyed && connection.writable && connection.readable; | ||
return !connection.destroyed && connection.writable; | ||
} | ||
@@ -222,0 +222,0 @@ |
@@ -111,2 +111,11 @@ var Response = require('./connection/commands').Response | ||
/** | ||
* Clone the cursor | ||
* @method | ||
* @return {Cursor} | ||
*/ | ||
this.clone = function() { | ||
return topology.cursor(ns, cmd, options); | ||
} | ||
/** | ||
* Retrieve the next document from the cursor | ||
@@ -288,2 +297,3 @@ * @method | ||
currentLimit = 0; | ||
init = false; | ||
@@ -290,0 +300,0 @@ dead = false; |
@@ -22,2 +22,3 @@ var inherits = require('util').inherits | ||
, GSSAPI = require('../auth/gssapi') | ||
, SSPI = require('../auth/sspi'); | ||
@@ -699,2 +700,5 @@ // All bson types | ||
// Setup the docs as an array | ||
ops = Array.isArray(ops) ? ops : [ops]; | ||
// Execute write | ||
if(fallback && (ismaster.maxWireVersion == null || ismaster.maxWireVersion == 0)) return fallback.insert(ismaster, ns, bson, pool, callbacks, ops, options, callback); | ||
@@ -721,2 +725,5 @@ executeWrite(this, 'insert', 'documents', ns, ops, options, callback); | ||
// Setup the docs as an array | ||
ops = Array.isArray(ops) ? ops : [ops]; | ||
// Execute write | ||
if(fallback && (ismaster.maxWireVersion == null || ismaster.maxWireVersion == 0)) return fallback.update(ismaster, ns, bson, pool, callbacks, ops, options, callback); | ||
@@ -743,2 +750,5 @@ executeWrite(this, 'update', 'updates', ns, ops, options, callback); | ||
// Setup the docs as an array | ||
ops = Array.isArray(ops) ? ops : [ops]; | ||
// Execute write | ||
if(fallback && (ismaster.maxWireVersion == null || ismaster.maxWireVersion == 0)) return fallback.remove(ismaster, ns, bson, pool, callbacks, ops, options, callback); | ||
@@ -925,3 +935,4 @@ executeWrite(this, 'delete', 'deletes', ns, ops, options, callback); | ||
this.cursor = function(ns, cmd, cursorOptions) { | ||
return new Cursor(bson, ns, cmd, cursorOptions, self, options); | ||
var FinalCursor = cursorOptions.cursorFactory || Cursor; | ||
return new FinalCursor(bson, ns, cmd, cursorOptions, self, options); | ||
} | ||
@@ -938,3 +949,4 @@ | ||
this.addAuthProvider('plain', new Plain()); | ||
this.addAuthProvider('gssapi', new GSSAPI()); | ||
this.addAuthProvider('gssapi', new GSSAPI()); | ||
this.addAuthProvider('sspi', new SSPI()); | ||
} | ||
@@ -941,0 +953,0 @@ |
{ | ||
"name": "mongodb-core", | ||
"version": "1.0.0-alpha3", | ||
"version": "1.0.0-alpha4", | ||
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
295708
7735