Skip to content

Commit fe3d60c

Browse files
committed
convenience method to get collection from cursor
1 parent b965341 commit fe3d60c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/com/mongodb/DBCursor.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,14 @@ public DBObject getQuery(){
637637
return _query;
638638
}
639639

640+
/**
641+
* gets the collection
642+
* @return
643+
*/
644+
public DBCollection getCollection(){
645+
return _collection;
646+
}
647+
640648
// ---- query setup ----
641649
private final DBCollection _collection;
642650
private final DBObject _query;

0 commit comments

Comments
 (0)