File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,15 @@ public static void main(String[] args) {
31
31
32
32
// Deletes the first document that has a "title" value of "The Garbage Pail Kids Movie"
33
33
DeleteResult result = collection .deleteOne (deleteOneQuery );
34
- System .out .println ("Deleted document count - query for 1 : " + result .getDeletedCount ());
34
+ System .out .println ("Deleted document count - delete one : " + result .getDeletedCount ());
35
35
36
36
Bson deleteManyQuery = lt ("imdb.rating" , 1.9 );
37
37
38
38
// Deletes all documents that have an "imdb.rating" value less than 1.9
39
39
result = collection .deleteMany (deleteManyQuery );
40
40
41
41
// Prints the number of deleted documents
42
- System .out .println ("Deleted document count - unlimited query : " + result .getDeletedCount ());
42
+ System .out .println ("Deleted document count - delete many : " + result .getDeletedCount ());
43
43
}
44
44
}
45
45
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public static void main(String[] args) {
33
33
.append ("genres" , Arrays .asList ("Documentary" , "Comedy" )));
34
34
35
35
// Prints the ID of the inserted document
36
- System .out .println ("insertOne() document id: " + result .getInsertedId ());
36
+ System .out .println ("Inserted document id - insert one : " + result .getInsertedId ());
37
37
38
38
// Creates two sample documents containing a "title" field
39
39
List <Document > movieList = Arrays .asList (
@@ -44,7 +44,7 @@ public static void main(String[] args) {
44
44
InsertManyResult result = collection .insertMany (movieList );
45
45
46
46
// Prints the IDs of the inserted documents
47
- System .out .println ("insertMany() document ids : " + result .getInsertedIds ());
47
+ System .out .println ("Inserted document id - insert many : " + result .getInsertedIds ());
48
48
}
49
49
}
50
50
}
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ public static void main(String[] args) {
41
41
UpdateResult result = collection .updateOne (updateOneQuery , updateOneUpdates , options );
42
42
43
43
// Prints the number of updated documents and the upserted document ID, if an upsert was performed
44
- System .out .println ("updateOne() modified document count : " + result .getModifiedCount ());
45
- System .out .println ("Upserted ID: " + result .getUpsertedId ());
44
+ System .out .println ("Number of documents updated - update one : " + result .getModifiedCount ());
45
+ System .out .println ("Upserted document ID: " + result .getUpsertedId ());
46
46
47
47
Bson updateManyQuery = gt ("num_mflix_comments" , 50 );
48
48
@@ -55,7 +55,7 @@ public static void main(String[] args) {
55
55
UpdateResult result = collection .updateMany (updateManyQuery , updateManyUpdates );
56
56
57
57
// Prints the number of updated documents
58
- System .out .println ("\n updateMany() modified document count : " + result .getModifiedCount ());
58
+ System .out .println ("\n Number of documents updated - update many : " + result .getModifiedCount ());
59
59
}
60
60
}
61
61
}
You can’t perform that action at this time.
0 commit comments