[SERVER-6633] Incorrect help text in shell -- o.isObjectId is not a function Created: 28/Jul/12  Updated: 11/Jul/16  Resolved: 19/Sep/12

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.0.6
Fix Version/s: 2.3.0

Type: Bug Priority: Trivial - P5
Reporter: Tad Marshall Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

The text displayed in the mongo shell for "help misc" gives incorrect syntax for the isObjectId property. It is shown as a function, but it is just a property.

MongoDB shell version: 2.2.0-rc1-pre-
> help misc
        b = new BinData(subtype,base64str)  create a BSON BinData value
        b.subtype()                         the BinData subtype (0..255)
        b.length()                          length of the BinData data in bytes
        b.hex()                             the data as a hex encoded string
        b.base64()                          the data as a base 64 encoded string
        b.toString()
 
        b = HexData(subtype,hexstr)         create a BSON BinData value from a hex string
        b = UUID(hexstr)                    create a BSON BinData value of UUID subtype
        b = MD5(hexstr)                     create a BSON BinData value of MD5 subtype
        "hexstr"                            string, sequence of hex characters (no 0x prefix)
 
        o = new ObjectId()                  create a new ObjectId
        o.getTimestamp()                    return timestamp derived from first 32 bits of the OID
        o.isObjectId()
        o.toString()
        o.equals(otherid)
 
        d = ISODate()                       like Date() but behaves more intuitively when used
        d = ISODate('YYYY-MM-DD hh:mm:ss')    without an explicit "new " prefix on construction
> o = new ObjectId()
ObjectId("5014000dd3f4f73f93ee6fb6")
> o.isObjectId()
Sat Jul 28 11:07:07 TypeError: o.isObjectId is not a function (shell):1
> o.isObjectId
true
>



 Comments   
Comment by auto [ 19/Sep/12 ]

Author:

{u'date': u'2012-08-28T09:16:17-07:00', u'email': u'shaun.verch@10gen.com', u'name': u'Shaun Verch'}

Message: SERVER-6633 removed parens at end of non function member help message
Branch: master
https://github.com/mongodb/mongo/commit/a9e2902d31bef518a8906f1a8ef72c2d436eaad3

Generated at Thu Feb 08 03:12:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.