Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1185

Rename Database::selectCollection to getCollection

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: CRUD
    • None

      PHPLIB is the only driver that have named the method MongoDB\Database::selectCollection($name) 

      • In mongosh and Java it is named db.getCollection(name) 
      • In python it's the same name in snake case:  Database.get_collection().

      Proposition: 

      • Add MongoDB\Database::getCollection($name)
      • Deprecate MongoDB\Database::selectCollection($name)

      Benefits: it is easier to translate a query from PHP to mongosh and vice versa.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: