Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-20

Allowing duplicate keys in language's BSON representation

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      What is the best way for us to represent documents like the following in Ruby, Python, PHP, etc.

      db.posts.find( { keywords :

      { $in : ["a", "b"] }

      , keywords :

      { $in : ["c, d"] }

      } )

      Options:

      Use a JSON string.
      Create a hash/dict subclass that allows duplicates.
      Come up with some other way of writing this in a dictionary: { $dup: { key: "keywords", values: [

      { $in: [ "a", "b" ] }

      ,

      { $in: [ "c", "d" ] }

      ] } }

      • either translate at the driver level or support this in the server.

            Assignee:
            mike Michael Dirolf
            Reporter:
            mike Michael Dirolf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: