<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:02:16 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-3168] add some convenient methods for BinData and UUID</title>
                <link>https://jira.mongodb.org/browse/SERVER-3168</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;MongoDB shell version: 1.9.1-pre-&lt;br/&gt;
&amp;gt; help misc&lt;br/&gt;
        b = new BinData(subtype,base64str)  create a BSON BinData value&lt;br/&gt;
        b.subtype()                         the BinData subtype (0..255)&lt;br/&gt;
        b.length()                          length of the BinData data in bytes&lt;br/&gt;
        b.hex()                             the data as a hex encoded string&lt;br/&gt;
        b.base64()                          the data as a base 64 encoded string&lt;br/&gt;
        b.toString()&lt;/p&gt;


&lt;p&gt;        b = HexData(subtype,hexstr)         create a BSON BinData value from a hex string&lt;br/&gt;
        b = UUID(hexstr)                    create a BSON BinData value of UUID subtype&lt;br/&gt;
        b = MD5(hexstr)                     create a BSON BinData value of MD5 subtype&lt;/p&gt;


&lt;p&gt;        o = new ObjectId()                  create a new ObjectId&lt;br/&gt;
        o.getTimestamp()                    return timestamp derived from first 32 bits of the OID&lt;br/&gt;
        o.isObjectId()&lt;br/&gt;
        o.toString()&lt;br/&gt;
        o.equals(otherid)&lt;/p&gt;</description>
                <environment></environment>
        <key id="17669">SERVER-3168</key>
            <summary>add some convenient methods for BinData and UUID</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="antoine">Antoine Girbal</assignee>
                                    <reporter username="antoine">Antoine Girbal</reporter>
                        <labels>
                    </labels>
                <created>Mon, 30 May 2011 17:00:38 +0000</created>
                <updated>Tue, 12 Jul 2016 00:18:32 +0000</updated>
                            <resolved>Tue, 31 May 2011 19:18:03 +0000</resolved>
                                                    <fixVersion>1.9.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="38770" author="auto" created="Wed, 22 Jun 2011 17:16:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt;: Fixed hexadecimal output, added tests&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/403b7aa8a28094fb4f541a86d8f89c0c794ef329&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/403b7aa8a28094fb4f541a86d8f89c0c794ef329&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="37931" author="antoine" created="Thu, 16 Jun 2011 21:24:23 +0000"  >&lt;p&gt;many thanks for report, I will fix that&lt;/p&gt;</comment>
                            <comment id="37926" author="mark1ewis" created="Thu, 16 Jun 2011 21:02:55 +0000"  >&lt;p&gt;I just tested the 2011-06-15 nightly, and the new .hex() method, while convenient, seems to have a bug where it drops zeroes, leading to incorrect results&lt;/p&gt;

&lt;p&gt;If I take a BinData(3, &quot;OEJTfmD8twzaj/LPKLIVkA==&quot;) and convert to hex, I get the following (Correct output, then Mongo output):&lt;/p&gt;

&lt;p&gt;38 42 53 7e 60 fc b7 0c da 8f f2 cf 28 b2 15 90&lt;br/&gt;
38 42 53 7e 60 fc b7  c da 8f f2 cf 28 b2 15 90&lt;/p&gt;

&lt;p&gt;(spaces were added to separate the bytes, note the missing 0 on the most-significant byte in the UUID).&lt;/p&gt;

&lt;p&gt;This is also apparent because round-tripping the value to/from hex changes the value:&lt;/p&gt;

&lt;p&gt;&amp;gt; var x = new BinData(3, &quot;OEJTfmD8twzaj/LPKLIVkA==&quot;)&lt;br/&gt;
&amp;gt; x == new HexData(3, x.hex())&lt;br/&gt;
false&lt;br/&gt;
&amp;gt; new HexData(3, x.hex())&lt;br/&gt;
BinData(3,&quot;OEJTfmD8t82o/yzyiyFZ&quot;)&lt;/p&gt;</comment>
                            <comment id="35365" author="auto" created="Tue, 31 May 2011 19:18:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt;: finished MD5 and HexData for v8&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/13364b16f47fb83b3cc5b9946fd1c9e2b57ae7eb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/13364b16f47fb83b3cc5b9946fd1c9e2b57ae7eb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="35222" author="auto" created="Mon, 30 May 2011 23:30:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt;: added UUID type and method. Fixed conversion to BSON.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8aeaf8d850d65c934cc5269e4c78a0eb138e9183&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8aeaf8d850d65c934cc5269e4c78a0eb138e9183&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="35221" author="auto" created="Mon, 30 May 2011 23:30:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt;: methods implemented for BinData&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e371c76ccac4f166b7f267114526a6c8b073f5de&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e371c76ccac4f166b7f267114526a6c8b073f5de&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="35188" author="auto" created="Mon, 30 May 2011 17:25:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt;: for v8, added base64() method and now the binary data is stored in internal field, cleaner&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1eb57466fc10c3538e1b1585fc709451909af359&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1eb57466fc10c3538e1b1585fc709451909af359&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="35187" author="auto" created="Mon, 30 May 2011 17:25:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3168&quot; title=&quot;add some convenient methods for BinData and UUID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3168&quot;&gt;&lt;del&gt;SERVER-3168&lt;/del&gt;&lt;/a&gt;: added length() and subtype(). Moved methods from SM layer to utils.js&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/21def6cf9438f77e54163c9109325d3f880fc6e6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/21def6cf9438f77e54163c9109325d3f880fc6e6&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="17567">SERVER-3153</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="12092">SERVER-1201</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 30 May 2011 17:25:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 35 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 35 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>antoine</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>mark1ewis</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroyyn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrifnz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21190</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrrlhb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>