Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-995

The structure of the OPT_QUERY packet is not consistent

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 1.5.0
    • Querying
    • None

    Description

      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.

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            pablo pablo platt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: