[CXX-250] better api on GridFS and GridFile Created: 13/Jan/14 Updated: 21/Jun/23 Resolved: 07/Jan/15 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Thomas Riccardi | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | cxxmove, legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
In In fact others key features are missing from the GridFS & GridFile classes.
A real use-case: multiple files with the same filename, I just want to get a GridFile of the last inserted file given a filename: I cannot use GridFS and GridFile to do that with the current API. |
| Comments |
| Comment by Adam Midvidy [ 07/Jan/15 ] |
|
At this time we do not plan to make significant changes to the API of the legacy driver. |
| Comment by Thomas Riccardi [ 13/Jan/14 ] |
|
We currently have no way to construct a GridFile from a cursor or a BSONObj, although it's what's done in private. It would thus be great to have a public or at least protected constructor for GridFile, instead of private. |
| Comment by Thomas Riccardi [ 13/Jan/14 ] |
|
For the full api like find() there are also the read preferences, see this patch; which adds an optional readPrefMode paramater to many methods; and also optionally disables the ensureIndex (this performance patch is the only thing needed to dynamically create GridFS objects from parsing a URI for example). |