Skip to content

Commit c570099

Browse files
committed
NODE-501 Removed reference to useLegacyOps in examples as it does not exist
1 parent ce7a873 commit c570099

File tree

4 files changed

+5
-23
lines changed

4 files changed

+5
-23
lines changed

lib/collection.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,24 +2656,6 @@ Collection.prototype.initializeOrderedBulkOp = function(options) {
26562656
return ordered(this.s.topology, this, options);
26572657
}
26582658

2659-
// // Get write concern
2660-
// var writeConcern = function(target, db, col, options) {
2661-
// if(options.w != null || options.j != null || options.fsync != null) {
2662-
// var opts = {};
2663-
// if(options.w != null) opts.w = options.w;
2664-
// if(options.wtimeout != null) opts.wtimeout = options.wtimeout;
2665-
// if(options.j != null) opts.j = options.j;
2666-
// if(options.fsync != null) opts.fsync = options.fsync;
2667-
// target.writeConcern = opts;
2668-
// } else if(col.writeConcern.w != null || col.writeConcern.j != null || col.writeConcern.fsync != null) {
2669-
// target.writeConcern = col.writeConcern;
2670-
// } else if(db.writeConcern.w != null || db.writeConcern.j != null || db.writeConcern.fsync != null) {
2671-
// target.writeConcern = db.writeConcern;
2672-
// }
2673-
//
2674-
// return target
2675-
// }
2676-
26772659
// Get write concern
26782660
var writeConcern = function(target, db, col, options) {
26792661
if(options.w != null || options.j != null || options.fsync != null) {

test/functional/bulk_tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ exports['Should correctly handle single unordered batch API'] = {
474474
test.equal(err, null);
475475

476476
// Initialize the unordered Batch
477-
var batch = col.initializeUnorderedBulkOp({useLegacyOps: true});
477+
var batch = col.initializeUnorderedBulkOp();
478478

479479
// Add some operations to be executed in order
480480
batch.insert({b:1, a:1});
@@ -1182,7 +1182,7 @@ exports['should correctly split unordered bulk batch'] = {
11821182

11831183
operation.execute(function(err, result) {
11841184
test.equal(null, err);
1185-
1185+
11861186
db.close();
11871187
test.done();
11881188
});
@@ -1241,7 +1241,7 @@ exports['should correctly split ordered bulk batch'] = {
12411241

12421242
operation.execute(function(err, result) {
12431243
test.equal(null, err);
1244-
1244+
12451245
db.close();
12461246
test.done();
12471247
});

test/functional/operation_example_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8017,7 +8017,7 @@ exports['Should correctly execute unordered batch with no errors'] = {
80178017
// Get the collection
80188018
var col = db.collection('batch_write_unordered_ops_legacy_0');
80198019
// Initialize the unordered Batch
8020-
var batch = col.initializeUnorderedBulkOp({useLegacyOps: true});
8020+
var batch = col.initializeUnorderedBulkOp();
80218021

80228022
// Add some operations to be executed in order
80238023
batch.insert({a:1});

test/functional/operation_promises_example_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5904,7 +5904,7 @@ exports['Should correctly execute unordered batch with no errors With Promises']
59045904
// Get the collection
59055905
var col = db.collection('batch_write_unordered_ops_legacy_0_with_promise');
59065906
// Initialize the unordered Batch
5907-
var batch = col.initializeUnorderedBulkOp({useLegacyOps: true});
5907+
var batch = col.initializeUnorderedBulkOp();
59085908

59095909
// Add some operations to be executed in order
59105910
batch.insert({a:1});

0 commit comments

Comments
 (0)