<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:14:03 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>[CDRIVER-2064] Add bson_iter_init_from_data function</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2064</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The mongocxx driver would benefit from the ability to directly initialize a &lt;tt&gt;bson_iter_t&lt;/tt&gt; from a data buffer, rather than having to repetitively call &lt;tt&gt;bson_init_static&lt;/tt&gt; merely to call &lt;tt&gt;bson_iter_init&lt;/tt&gt;.  As &lt;tt&gt;bson_iter_init&lt;/tt&gt; only uses the passed &lt;tt&gt;bson_t&lt;/tt&gt; to extract a buffer pointer and length, we&apos;d like an alternative initializer for &lt;tt&gt;bson_iter_t&lt;/tt&gt; that takes those directly.&lt;/p&gt;

&lt;p&gt;A PR will follow shortly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="356297">CDRIVER-2064</key>
            <summary>Add bson_iter_init_from_data function</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Feb 2017 18:05:46 +0000</created>
                <updated>Wed, 24 Jan 2018 15:04:55 +0000</updated>
                            <resolved>Tue, 28 Feb 2017 22:05:13 +0000</resolved>
                                                    <fixVersion>1.7.0</fixVersion>
                                    <component>libbson</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1511696" author="jesse" created="Tue, 28 Feb 2017 22:07:05 +0000"  >&lt;p&gt;There were good reasons &lt;b&gt;not&lt;/b&gt; to do this. First, that future users will wonder why we don&apos;t now have bson_iter_init_find_from_data, etc. Second, that it violates the object hierarchy that organizes libbson: raw data creates bson_t creates bson_iter_t. But practicality beats purity, and the reasons for adding this function won.&lt;/p&gt;</comment>
                            <comment id="1511692" author="jesse" created="Tue, 28 Feb 2017 22:05:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/libbson/commit/02dc4612a28041a5ca808789f2501e147ea35e6c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/02dc4612a28041a5ca808789f2501e147ea35e6c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/libbson/commit/b643cc3b38fcf3158a732aaf7b152ba089efa423&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/b643cc3b38fcf3158a732aaf7b152ba089efa423&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1506386" author="bjori" created="Wed, 22 Feb 2017 19:34:18 +0000"  >&lt;p&gt;Thanks for the context and adding the relation to &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-984&quot; title=&quot;Improve use of bson_init_static&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-984&quot;&gt;&lt;del&gt;CXX-984&lt;/del&gt;&lt;/a&gt;. I could not have known from the description.&lt;/p&gt;</comment>
                            <comment id="1506310" author="david.golden" created="Wed, 22 Feb 2017 18:29:34 +0000"  >&lt;p&gt;We need this for internal optimization.  We can&apos;t initialize a &lt;tt&gt;bson_t&lt;/tt&gt; with &lt;tt&gt;bson_init_static&lt;/tt&gt; and cache it because of the problem mentioned in &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2065&quot; title=&quot;Document that bson_init_static structures must not be copied&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2065&quot;&gt;&lt;del&gt;CDRIVER-2065&lt;/del&gt;&lt;/a&gt;.  If you&apos;d like to fix &lt;b&gt;that&lt;/b&gt; problem (by providing a copyable static &lt;tt&gt;bson_t&lt;/tt&gt; implementation), that would work, too, but this is a more direct fix, as &lt;tt&gt;bson_iter_t&lt;/tt&gt; is just a wrapper around a buffer pointer anyway.  Sam and I have already discussed this issue with Jesse as part of our work on &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-984&quot; title=&quot;Improve use of bson_init_static&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-984&quot;&gt;&lt;del&gt;CXX-984&lt;/del&gt;&lt;/a&gt; and this was Jesse&apos;s recommended approach.&lt;/p&gt;

&lt;p&gt;I don&apos;t want to add &lt;tt&gt;bson_iter_init_from_data_find&lt;/tt&gt;  because I don&apos;t think those functions should ever have been combined in the first place.  You&apos;re welcome to add that if you think it&apos;s important.&lt;/p&gt;</comment>
                            <comment id="1506303" author="bjori" created="Wed, 22 Feb 2017 18:20:16 +0000"  >&lt;p&gt;I&apos;m skeptical about this. It seems like a helper function the app itself should be providing.&lt;br/&gt;
Going down this road, why not add&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;bson_iter_init_from_data_find (data, &quot;key&quot;)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="1506293" author="david.golden" created="Wed, 22 Feb 2017 18:09:18 +0000"  >&lt;p&gt;PR: &lt;a href=&quot;https://github.com/mongodb/libbson/pull/182&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/pull/182&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="307142">CXX-984</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="486258">CDRIVER-2467</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsvchj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1602">C Driver 2017 2 - Feb 10, 2019</customfieldvalue>

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