[DRIVERS-950] Replace GridFSFindOptions with reference to FindOptions in CRUD spec Created: 17/Jan/20  Updated: 20/Aug/20  Resolved: 20/Aug/20

Status: Closed
Project: Drivers
Component/s: GridFS
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related

 Description   

In this comment on the PR for SPEC-1418, I pointed out that Bucket::find() is just a wrapper/proxy for Collection::find() on the fs.files collection:

IIRC, Bucket::find() is just a proxy for a find() operation on the fs.files collection and opens a cursor on the raw documents (nothing to do with opening download streams).

I don't recall why we defined GridFSFindOptions separately instead of supporting FindOptions in the CRUD spec, but the underlying operation should be the same. GridFSFindOptions was also never updated to support options such as collation. Was that intentional or just an oversight?

I might propose removing this and just creating a new SPEC ticket to consolidate and just reference FindOptions and the CRUD spec unless there's good reason to keep them separate.

I don't see any reason why we need to distinguish between find options for the GridFS or general CRUD API, unless some drivers actually implement these as separate code paths.



 Comments   
Comment by Jeremy Mikola [ 20/Aug/20 ]

This may cause BC breaks in some drivers where the return value of Bucket::find() is modeled and not a free-form document (e.g. Java's GridFSFile class), so we'll leave the GridFS spec as-is.

Comment by Matt Broadstone [ 18/May/20 ]

jmikola any updates here?

Comment by Esha Bhargava [ 31/Mar/20 ]

jmikola Please research if this would be a breaking change in any driver. If it is, suggestion is to close this as won't do.

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