Allow filter to be an Optional argument

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Component/s: CRUD
    • None

      Right now, the crud spec defines the method signature for find as the following:

      find(filter: Document, options: Optional<FindOptions>): Iterable<Document> 

      which implies that filter cannot be Optional<Document>.

      Would it be acceptable for drivers to accept this filter as an optional so that users won't have to specify the empty document when they want to match all documents? Or is this distinction intentional?

      As sam.rossi points out, there already is precedent for this in several drivers (e.g. Java via overloading, Python via accepting None).

            Assignee:
            Unassigned
            Reporter:
            Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: