Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-320

NodeJS driver manual instructions don't match code samples

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None

    Description

      Several pages go back and forth between using MongoClient (the new way) and Db (the old way) when talking about connecting to MongoDB. It's confusing when the code sample is one and the explanatory text is the other, especially if you weren't around when most of the drivers switched over to use MongoClient syntax

      1)
      http://mongodb.github.io/node-mongodb-native/1.4/api-articles/nodekoarticle1.html#getting-that-connection-to-the-database

      code sample uses MongoClient.connect, but text talks about Db.connect

      2)
      http://mongodb.github.io/node-mongodb-native/api-generated/admin.html

      Code sample imports MongoClient but never uses it. Page is for the Admin() constructor, which takes a db object. Code sample doesn't appear to use this constructor and instead uses db = new Db( dbNameStr, new Server (... and then calls db.admin()

      Attachments

        Activity

          People

            Unassigned Unassigned
            david.erickson David Erickson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: