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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2
    • Affects Version/s: 2.0.1, 2.1
    • Component/s: None
    • Environment:
      Ubuntu 11.04 x64
      Windows 7 Enterprise x64
      Windows Server 2008 R2 x64
    • Minor Change

      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).

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

              Created:
              Updated:
              Resolved: