robbiblubber.org

help | login | search:  
>>

show wiki  show source  compare to current  compare to previous  read  history 


getCollection()


MongoDB Driver Function Reference


Gets a collection by its name.

db.getCollection("col") can be substituted by using db.col.



db.getCollection(<name>)



Arguments


<name> Collection name



Return Value


Returns a collection.



Example


db.getCollection("employees").find();


Gets the employees collection and calls the find() method on the collection.






home | MongoDB Driver Function Reference | MongoDB Driver