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) {
3131
3232 // Deletes the first document that has a "title" value of "The Garbage Pail Kids Movie"
3333 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 ());
3535
3636 Bson deleteManyQuery = lt ("imdb.rating" , 1.9 );
3737
3838 // Deletes all documents that have an "imdb.rating" value less than 1.9
3939 result = collection .deleteMany (deleteManyQuery );
4040
4141 // 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 ());
4343 }
4444 }
4545}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public static void main(String[] args) {
3333 .append ("genres" , Arrays .asList ("Documentary" , "Comedy" )));
3434
3535 // 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 ());
3737
3838 // Creates two sample documents containing a "title" field
3939 List <Document > movieList = Arrays .asList (
@@ -44,7 +44,7 @@ public static void main(String[] args) {
4444 InsertManyResult result = collection .insertMany (movieList );
4545
4646 // 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 ());
4848 }
4949 }
5050}
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ public static void main(String[] args) {
4141 UpdateResult result = collection .updateOne (updateOneQuery , updateOneUpdates , options );
4242
4343 // 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 ());
4646
4747 Bson updateManyQuery = gt ("num_mflix_comments" , 50 );
4848
@@ -55,7 +55,7 @@ public static void main(String[] args) {
5555 UpdateResult result = collection .updateMany (updateManyQuery , updateManyUpdates );
5656
5757 // 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 ());
5959 }
6060 }
6161}
You can’t perform that action at this time.
0 commit comments