The structure of the OPT_QUERY packet is not consistent

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.5.0
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      sort, hint, snapshot, explain(and more in the future) goes inside {$query :

      {x:1}

      , /* options */ }
      for example: {$query :

      {x:1}

      , $orderby : {y:-1}}

      skip, limit and fields are separate attributes.

      There is no reason, other then historical I think, that there are two types of options.

      Moving all the options inside the query doc will make the query packet more consistent, extensible, easier to code and understand drivers.
      It is an easy change in the drivers and won't break the API.

            Assignee:
            David Storch
            Reporter:
            pablo platt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: