Skip to content

Commit 54a2e19

Browse files
committed
PHP-1322: More renaming
1 parent b5c3810 commit 54a2e19

18 files changed

+83
-83
lines changed

docs/batch.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ $manager = new MongoDB\Manager("mongodb://localhost:27017");
108108
$wc = new MongoDB\WriteConcern(MongoDB\WriteConcern::MAJORITY);
109109
$result = $manager->executeWriteBatch("db.collection", $batch, $wc);
110110

111-
printf("numInserted: %d\n", $result->getInsertedCount());
112-
printf("numMatched: %d\n", $result->getMatchedCount());
113-
printf("numModified: %d\n", $result->getModifiedCount());
114-
printf("numUpserted: %d\n", $result->getUpsertedCount());
115-
printf("numRemoved: %d\n", $result->getDeletedCount());
111+
printf("insertedCount: %d\n", $result->getInsertedCount());
112+
printf("matchedCount: %d\n", $result->getMatchedCount());
113+
printf("modifiedCount: %d\n", $result->getModifiedCount());
114+
printf("upsertedCount: %d\n", $result->getUpsertedCount());
115+
printf("deletedCount: %d\n", $result->getDeletedCount());
116116

117117
foreach ($result->getUpsertedIds() as $index => $id) {
118118
printf("upsertedId: '%s', index: %d\n", $id, $index);

old-docs/api/MongoDB/WriteResult.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class WriteResult
1515
*
1616
* @return integer
1717
*/
18-
public function getNumInserted() {
18+
public function getInsertedCount() {
1919
/*** CIMPL ***/
2020
/*
2121
RETURN_LONG(intern->nInserted);
@@ -28,7 +28,7 @@ public function getNumInserted() {
2828
*
2929
* @return integer
3030
*/
31-
public function getNumMatched() {
31+
public function getMatchedCount() {
3232
/*** CIMPL ***/
3333
/*
3434
RETURN_LONG(intern->nMatched);
@@ -41,7 +41,7 @@ public function getNumMatched() {
4141
*
4242
* @return integer
4343
*/
44-
public function getNumModified() {
44+
public function getModifiedCount() {
4545
/*** CIMPL ***/
4646
/*
4747
RETURN_LONG(intern->nModified);
@@ -54,7 +54,7 @@ public function getNumModified() {
5454
*
5555
* @return integer
5656
*/
57-
public function getNumRemoved() {
57+
public function getDeletedCount() {
5858
/*** CIMPL ***/
5959
/*
6060
RETURN_LONG(intern->nRemoved);
@@ -67,7 +67,7 @@ public function getNumRemoved() {
6767
*
6868
* @return integer
6969
*/
70-
public function getNumUpserted() {
70+
public function getUpsertedCount() {
7171
/*** CIMPL ***/
7272
/*
7373
RETURN_LONG(intern->nUpserted);

old-docs/examples/insert.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
printf(
2020
"Inserted %d documents to %s\n",
21-
$result->getNumInserted(),
21+
$result->getInsertedCount(),
2222
$result->getServer()->getHost()
2323
);
2424
printf("hannes: %s (%s)\nhayley: %s (%s)\n", $hannes_id, get_class($hannes_id), $hayley_id, get_class($hannes_id));

tests/batch/write-0001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $batch->update(array("foo" => "bar"), array('$set' => array("foo" => "baz")), ar
2121
$retval = $mc->executeWriteBatch(NS, $batch);
2222

2323
printf("Inserted: %d\n", getInsertCount($retval));
24-
printf("Deleted: %d\n", getRemovedCount($retval));
24+
printf("Deleted: %d\n", getDeletedCount($retval));
2525
printf("Updated: %d\n", getModifiedCount($retval));
2626
printf("Upserted: %d\n", getUpsertedCount($retval));
2727
foreach(getWriteErrors($retval) as $error) {

tests/standalone/manager-executeDelete-001.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ var_dump(iterator_to_array($cursor));
2727
--EXPECT--
2828
===> WriteResult
2929
server: localhost:27017
30-
numInserted: 0
31-
numMatched: 0
32-
numModified: 0
33-
numUpserted: 0
34-
numRemoved: 1
30+
insertedCount: 0
31+
matchedCount: 0
32+
modifiedCount: 0
33+
upsertedCount: 0
34+
deletedCount: 1
3535

3636
===> Collection
3737
array(1) {

tests/standalone/manager-executeDelete-002.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ var_dump(iterator_to_array($cursor));
2828
--EXPECT--
2929
===> WriteResult
3030
server: localhost:27017
31-
numInserted: 0
32-
numMatched: 0
33-
numModified: 0
34-
numUpserted: 0
35-
numRemoved: 2
31+
insertedCount: 0
32+
matchedCount: 0
33+
modifiedCount: 0
34+
upsertedCount: 0
35+
deletedCount: 2
3636

3737
===> Collection
3838
array(0) {

tests/standalone/manager-executeInsert-001.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ var_dump(iterator_to_array($cursor));
2323
--EXPECT--
2424
===> WriteResult
2525
server: localhost:27017
26-
numInserted: 1
27-
numMatched: 0
28-
numModified: 0
29-
numUpserted: 0
30-
numRemoved: 0
26+
insertedCount: 1
27+
matchedCount: 0
28+
modifiedCount: 0
29+
upsertedCount: 0
30+
deletedCount: 0
3131

3232
===> Collection
3333
array(1) {

tests/standalone/manager-executeUpdate-001.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ var_dump(iterator_to_array($cursor));
3131
--EXPECT--
3232
===> WriteResult
3333
server: localhost:27017
34-
numInserted: 0
35-
numMatched: 1
36-
numModified: 1
37-
numUpserted: 0
38-
numRemoved: 0
34+
insertedCount: 0
35+
matchedCount: 1
36+
modifiedCount: 1
37+
upsertedCount: 0
38+
deletedCount: 0
3939

4040
===> Collection
4141
array(1) {

tests/standalone/manager-executeUpdate-002.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ var_dump(iterator_to_array($cursor));
3434
--EXPECT--
3535
===> WriteResult
3636
server: localhost:27017
37-
numInserted: 0
38-
numMatched: 2
39-
numModified: 2
40-
numUpserted: 0
41-
numRemoved: 0
37+
insertedCount: 0
38+
matchedCount: 2
39+
modifiedCount: 2
40+
upsertedCount: 0
41+
deletedCount: 0
4242

4343
===> Collection
4444
array(3) {

tests/standalone/manager-executeUpdate-003.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ var_dump(iterator_to_array($cursor));
2828
--EXPECT--
2929
===> WriteResult
3030
server: localhost:27017
31-
numInserted: 0
32-
numMatched: 0
33-
numModified: 0
34-
numUpserted: 1
35-
numRemoved: 0
31+
insertedCount: 0
32+
matchedCount: 0
33+
modifiedCount: 0
34+
upsertedCount: 1
35+
deletedCount: 0
3636
upsertedId[0]: int(1)
3737

3838
===> Collection

0 commit comments

Comments
 (0)