mongodb :: NativeMongoCollection :: new
mongoc_client_get_collection().Get a newly allocated mongoc_collection_t for the collection named
collection in the database named db.
Collections are automatically created on the MongoDB server upon insertion of the first document. There is no need to create a collection manually.
# Wrapper for `mongoc_client_get_collection()`.
#
# Get a newly allocated `mongoc_collection_t` for the collection named
# `collection` in the database named `db`.
#
# Collections are automatically created on the MongoDB server upon insertion
# of the first document.
# There is no need to create a collection manually.
new(client: NativeMongoClient, db, collection: CString) `{
return mongoc_client_get_collection(client, db, collection);
`}
lib/mongodb/native_mongodb.nit:307,2--317,3