Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3168

add some convenient methods for BinData and UUID

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 1.9.1
    • None
    • None

    Description

      MongoDB shell version: 1.9.1-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

      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)

      Attachments

        Issue Links

          Activity

            People

              antoine Antoine Girbal
              antoine Antoine Girbal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: