Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-308

PyMongo should be able to store type 13 (Javascript without scope)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 2.0.1, 2.1
    • 2.2
    • None
    • Ubuntu 11.04 x64
      Windows 7 Enterprise x64
      Windows Server 2008 R2 x64
    • Minor Change

    Description

      Is another way to save some data with type 13 or 14 ?

      1) Can't insert in database some data with type 13 (Javascript). This type was found here

      import pymongo
      import bson
       
      coll = pymongo.Connection().testdb.tmpcoll3
      coll.remove()
      coll.insert({"field": bson.Code("function(){ return true; }", scope=None)}, safe=True)
      item = coll.find_one({"field": {"$type": 13}})
       
      # item would be None but must exists

      2) There is no way to save in database some data with type 14 (Symbol).

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            uladzimir_mihura@epam.com Uladzimir Mihura
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: