diff options
Diffstat (limited to 'src/mongo/shell/bulk_api.js')
-rw-r--r-- | src/mongo/shell/bulk_api.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mongo/shell/bulk_api.js b/src/mongo/shell/bulk_api.js index 777779215de..a872a1e1ca3 100644 --- a/src/mongo/shell/bulk_api.js +++ b/src/mongo/shell/bulk_api.js @@ -419,14 +419,6 @@ var _bulk_api_module = (function() { this.shellPrint = function() { return this.toString(); }; - - this.toSingleResult = function() { - // This is *only* safe to do with a WriteCommandError from the bulk api when the bulk is - // known to be of size == 1 - var bulkResult = getEmptyBulkResult(); - bulkResult.writeErrors.push({code: this.code, index: 0, errmsg: this.errmsg}); - return new BulkWriteResult(bulkResult, NONE).toSingleResult(); - }; }; WriteCommandError.prototype = Object.create(Error.prototype); @@ -1210,6 +1202,7 @@ var _bulk_api_module = (function() { module.BulkWriteResult = BulkWriteResult; module.BulkWriteError = BulkWriteError; module.WriteCommandError = WriteCommandError; + module.WriteError = WriteError; module.initializeUnorderedBulkOp = function() { return new Bulk(this, false); }; @@ -1227,6 +1220,7 @@ WriteResult = _bulk_api_module.WriteResult; BulkWriteResult = _bulk_api_module.BulkWriteResult; BulkWriteError = _bulk_api_module.BulkWriteError; WriteCommandError = _bulk_api_module.WriteCommandError; +WriteError = _bulk_api_module.WriteError; /*********************************************************** * Adds the initializers of bulk operations to the db collection |