Skip to content

Commit fb2fef8

Browse files
committed
CXX-175 rename files and things
1 parent 30c654b commit fb2fef8

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

src/SConscript.client

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ clientSourceBasic = [
7373
'mongo/bson/optime.cpp',
7474
'mongo/bson/util/bson_extract.cpp',
7575
'mongo/client/bulk_operation_builder.cpp',
76-
'mongo/client/bulk_upsert_operation.cpp',
77-
'mongo/client/bulk_write_operation.cpp',
76+
'mongo/client/bulk_update_builder.cpp',
77+
'mongo/client/bulk_upsert_builder.cpp',
7878
'mongo/client/command_writer.cpp',
7979
'mongo/client/connpool.cpp',
8080
'mongo/client/dbclient.cpp',
@@ -187,8 +187,8 @@ clientHeaders = [
187187
'mongo/bson/util/misc.h',
188188
'mongo/client/autolib.h',
189189
'mongo/client/bulk_operation_builder.h',
190-
'mongo/client/bulk_upsert_operation.h',
191-
'mongo/client/bulk_write_operation.h',
190+
'mongo/client/bulk_update_builder.h',
191+
'mongo/client/bulk_upsert_builder.h',
192192
'mongo/client/connpool.h',
193193
'mongo/client/dbclient.h',
194194
'mongo/client/dbclient_rs.h',

src/mongo/client/bulk_operation_builder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ namespace mongo {
4343
delete *it;
4444
}
4545

46-
BulkWriteOperation BulkOperationBuilder::find(const BSONObj& selector) {
47-
return BulkWriteOperation(this, selector);
46+
BulkUpdateBuilder BulkOperationBuilder::find(const BSONObj& selector) {
47+
return BulkUpdateBuilder(this, selector);
4848
}
4949

5050
void BulkOperationBuilder::insert(const BSONObj& doc) {

src/mongo/client/bulk_operation_builder.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <vector>
1919

2020
#include "mongo/bson/bsonobj.h"
21-
#include "mongo/client/bulk_write_operation.h"
21+
#include "mongo/client/bulk_update_builder.h"
2222

2323
namespace mongo {
2424

@@ -52,11 +52,11 @@ namespace mongo {
5252
*/
5353
class MONGO_CLIENT_API BulkOperationBuilder {
5454

55-
/* Enable operations of this type to append themselves to _write_operations */
56-
friend class BulkWriteOperation;
55+
/* Enable operations of this type to append themselves to enqueue themselves */
56+
friend class BulkUpdateBuilder;
5757

58-
/* Enable operations of this type to append themselves to _write_operations */
59-
friend class BulkUpsertOperation;
58+
/* Enable operations of this type to append themselves to enqueue themselves */
59+
friend class BulkUpsertBuilder;
6060

6161
public:
6262
/**
@@ -82,7 +82,7 @@ namespace mongo {
8282
* @param selector A BSONObj that describes the objects to modify.
8383
* @return BulkWriteOperation A BulkWriteOperation with the selector specified.
8484
*/
85-
BulkWriteOperation find(const BSONObj& selector);
85+
BulkUpdateBuilder find(const BSONObj& selector);
8686

8787
/**
8888
* Enqueues an insert write operation to be executed as part of the bulk operation.

src/mongo/client/bulk_write_operation.cpp renamed to src/mongo/client/bulk_update_builder.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "mongo/platform/basic.h"
1717

18-
#include "mongo/client/bulk_write_operation.h"
18+
#include "mongo/client/bulk_update_builder.h"
1919

2020
#include "mongo/client/bulk_operation_builder.h"
2121
#include "mongo/client/delete_write_operation.h"
@@ -24,40 +24,40 @@
2424

2525
namespace mongo {
2626

27-
BulkWriteOperation::BulkWriteOperation(BulkOperationBuilder* const builder, const BSONObj& selector)
27+
BulkUpdateBuilder::BulkUpdateBuilder(BulkOperationBuilder* const builder, const BSONObj& selector)
2828
: _builder(builder)
2929
, _selector(selector)
3030
{ }
3131

32-
void BulkWriteOperation::updateOne(const BSONObj& update) {
32+
void BulkUpdateBuilder::updateOne(const BSONObj& update) {
3333
UpdateWriteOperation* update_op = new UpdateWriteOperation(_selector, update, 0);
3434
_builder->enqueue(update_op);
3535
}
3636

37-
void BulkWriteOperation::update(const BSONObj& update) {
37+
void BulkUpdateBuilder::update(const BSONObj& update) {
3838
UpdateWriteOperation* update_op = new UpdateWriteOperation(
3939
_selector, update, UpdateOption_Multi);
4040
_builder->enqueue(update_op);
4141
}
4242

43-
void BulkWriteOperation::replaceOne(const BSONObj& replacement) {
43+
void BulkUpdateBuilder::replaceOne(const BSONObj& replacement) {
4444
UpdateWriteOperation* update_op = new UpdateWriteOperation(
4545
_selector, replacement, 0);
4646
_builder->enqueue(update_op);
4747
}
4848

49-
void BulkWriteOperation::remove() {
49+
void BulkUpdateBuilder::remove() {
5050
DeleteWriteOperation* delete_op = new DeleteWriteOperation(_selector, 0);
5151
_builder->enqueue(delete_op);
5252
}
5353

54-
void BulkWriteOperation::removeOne() {
54+
void BulkUpdateBuilder::removeOne() {
5555
DeleteWriteOperation* delete_op = new DeleteWriteOperation(_selector, RemoveOption_JustOne);
5656
_builder->enqueue(delete_op);
5757
}
5858

59-
BulkUpsertOperation BulkWriteOperation::upsert() {
60-
return BulkUpsertOperation(_builder, _selector);
59+
BulkUpsertBuilder BulkUpdateBuilder::upsert() {
60+
return BulkUpsertBuilder(_builder, _selector);
6161
}
6262

6363
}

src/mongo/client/bulk_write_operation.h renamed to src/mongo/client/bulk_update_builder.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#pragma once
1717

1818
#include "mongo/bson/bsonobj.h"
19-
#include "mongo/client/bulk_upsert_operation.h"
19+
#include "mongo/client/bulk_upsert_builder.h"
2020

2121
namespace mongo {
2222

@@ -28,7 +28,7 @@ namespace mongo {
2828
* Not to be instantiated directly. Comes into being via the find() method on
2929
* BulkOperationBuilder.
3030
*/
31-
class MONGO_CLIENT_API BulkWriteOperation {
31+
class MONGO_CLIENT_API BulkUpdateBuilder {
3232

3333
friend class BulkOperationBuilder;
3434

@@ -68,16 +68,16 @@ namespace mongo {
6868
/**
6969
* Specifies that this write operation will be an upsert.
7070
*
71-
* @return BulkUpsertOperation A BulkWriteOperation that is an upsert.
71+
* @return BulkUpsertOperation A BulkUpdateBuilder that is an upsert.
7272
*/
73-
BulkUpsertOperation upsert();
73+
BulkUpsertBuilder upsert();
7474

7575
private:
7676
BulkOperationBuilder* const _builder;
7777
const BSONObj& _selector;
7878

7979
/* Only created by freind class BulkOperationBuilder */
80-
BulkWriteOperation(BulkOperationBuilder* const builder, const BSONObj& selector);
80+
BulkUpdateBuilder(BulkOperationBuilder* const builder, const BSONObj& selector);
8181
};
8282

8383
} // namespace mongo

src/mongo/client/bulk_upsert_operation.cpp renamed to src/mongo/client/bulk_upsert_builder.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,32 @@
1515

1616
#include "mongo/platform/basic.h"
1717

18-
#include "mongo/client/bulk_upsert_operation.h"
18+
#include "mongo/client/bulk_upsert_builder.h"
1919

2020
#include "mongo/client/bulk_operation_builder.h"
2121
#include "mongo/client/update_write_operation.h"
2222
#include "mongo/client/write_options.h"
2323

2424
namespace mongo {
2525

26-
BulkUpsertOperation::BulkUpsertOperation(BulkOperationBuilder* const builder, const BSONObj& selector)
26+
BulkUpsertBuilder::BulkUpsertBuilder(BulkOperationBuilder* const builder, const BSONObj& selector)
2727
: _builder(builder)
2828
, _selector(selector)
2929
{}
3030

31-
void BulkUpsertOperation::updateOne(const BSONObj& update) {
31+
void BulkUpsertBuilder::updateOne(const BSONObj& update) {
3232
UpdateWriteOperation* update_op = new UpdateWriteOperation(
3333
_selector, update, UpdateOption_Upsert);
3434
_builder->enqueue(update_op);
3535
}
3636

37-
void BulkUpsertOperation::update(const BSONObj& update) {
37+
void BulkUpsertBuilder::update(const BSONObj& update) {
3838
UpdateWriteOperation* update_op = new UpdateWriteOperation(
3939
_selector, update, UpdateOption_Upsert + UpdateOption_Multi);
4040
_builder->enqueue(update_op);
4141
}
4242

43-
void BulkUpsertOperation::replaceOne(const BSONObj& replacement) {
43+
void BulkUpsertBuilder::replaceOne(const BSONObj& replacement) {
4444
UpdateWriteOperation* update_op = new UpdateWriteOperation(
4545
_selector, replacement, UpdateOption_Upsert);
4646
_builder->enqueue(update_op);

src/mongo/client/bulk_upsert_operation.h renamed to src/mongo/client/bulk_upsert_builder.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ namespace mongo {
2828
* Not to be instantiated directly. Comes into being via the upsert() method on
2929
* BulkWriteOperation.
3030
*/
31-
class MONGO_CLIENT_API BulkUpsertOperation {
31+
class MONGO_CLIENT_API BulkUpsertBuilder {
3232

33-
friend class BulkWriteOperation;
33+
friend class BulkUpdateBuilder;
3434

3535
public:
3636
/**
@@ -63,7 +63,7 @@ namespace mongo {
6363
const BSONObj _selector;
6464

6565
/* Only created by freind class BulkWriteBuilder */
66-
BulkUpsertOperation(BulkOperationBuilder* const builder, const BSONObj& selector);
66+
BulkUpsertBuilder(BulkOperationBuilder* const builder, const BSONObj& selector);
6767
};
6868

6969
} // namespace mongo

0 commit comments

Comments
 (0)