[GODRIVER-568] Add Database() method on mongo.Collection Created: 18/Sep/18  Updated: 28/Oct/23  Resolved: 21/Sep/18

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.0.15

Type: New Feature Priority: Major - P3
Reporter: David Golden Assignee: David Golden
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by TOOLS-1833 Migrate tools (excluding mongoreplay)... Closed

 Description   

Just as mongo.Database offers a "Client" method, the mongo.Collection object should offer a "Database" method to look up in the object hierarchy. This would also help with feature parity with mgo, which makes "Database" a public property of mgo.Collection.



 Comments   
Comment by Githook User [ 21/Sep/18 ]

Author:

{'name': 'David Golden', 'email': 'xdg@xdg.me', 'username': 'xdg'}

Message: GODRIVER-568 Add Database accessor to Collection

Change-Id: Id5a0462addd15df659ff0609a18d2bbe3a511476
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/ac85d3eb866e9318e0a8085c3f9c6ecc3c698021

Comment by David Golden [ 19/Sep/18 ]

Tools code passes around collections and assumes that a database can be retrieved from it. Getting this feature will significantly ease conversion.

Generated at Thu Feb 08 08:34:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.