<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:08:14 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-20] Not-null-terminated string support</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-20</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;I&apos;d like to propose a new set of functions that can deal with not null terminated strings. It would really help in situations where names are part of a longer string. (just like there are strcpy and strncpy)&lt;/p&gt;

&lt;p&gt;For example for:&lt;br/&gt;
bson_buffer * bson_append_string( bson_buffer * b , const char * name , const char * str );&lt;br/&gt;
there could be:&lt;br/&gt;
bson_buffer * bson_append_string_n( bson_buffer * b , const char * name , const char * str , unsigned len );&lt;/p&gt;

&lt;p&gt;Same idea affects other types (symbol, code, regex, ...)&lt;/p&gt;</description>
                <environment></environment>
        <key id="12574">CDRIVER-20</key>
            <summary>Not-null-terminated string support</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="kbanker">Kyle Banker</assignee>
                                    <reporter username="viraptor">Stanis?aw Pitucha</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Jul 2010 22:24:59 +0000</created>
                <updated>Wed, 19 Oct 2016 22:33:33 +0000</updated>
                            <resolved>Fri, 8 Apr 2011 21:11:07 +0000</resolved>
                                                    <fixVersion>0.2</fixVersion>
                                                        <votes>1</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="29008" author="auto" created="Thu, 14 Apr 2011 19:10:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;banker&apos;, u&apos;name&apos;: u&apos;Kyle Banker&apos;, u&apos;email&apos;: u&apos;kylebanker@gmail.com&apos;}
&lt;p&gt;Message: minor: credits for &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-20&quot; title=&quot;Not-null-terminated string support&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-20&quot;&gt;&lt;del&gt;CDRIVER-20&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/a0a4a5d791306d1dbec297d987d7581e5158f179&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/a0a4a5d791306d1dbec297d987d7581e5158f179&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="29007" author="auto" created="Thu, 14 Apr 2011 19:10:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;algernon&apos;, u&apos;name&apos;: u&apos;Gergely Nagy&apos;, u&apos;email&apos;: u&apos;algernon@balabit.hu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-20&quot; title=&quot;Not-null-terminated string support&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-20&quot;&gt;&lt;del&gt;CDRIVER-20&lt;/del&gt;&lt;/a&gt;: bson _append_n functions.&lt;/p&gt;

&lt;p&gt;Added bson_append_string_n, bson_append_symbol_n, bson_append_code_n&lt;br/&gt;
and bson_append_code_w_scope_n, which do the same as their _n-less&lt;br/&gt;
counterparts, except that they take the value of the object to insert&lt;br/&gt;
up to a given length, instead of &apos;till the end of the C string.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/fc613cf459bbb69e874fe4899cdaad046543d092&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/fc613cf459bbb69e874fe4899cdaad046543d092&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="28449" author="auto" created="Fri, 8 Apr 2011 21:10:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;banker&apos;, u&apos;name&apos;: u&apos;Kyle Banker&apos;, u&apos;email&apos;: u&apos;kylebanker@gmail.com&apos;}
&lt;p&gt;Message: minor: credits for &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-20&quot; title=&quot;Not-null-terminated string support&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-20&quot;&gt;&lt;del&gt;CDRIVER-20&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/a0a4a5d791306d1dbec297d987d7581e5158f179&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/a0a4a5d791306d1dbec297d987d7581e5158f179&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="28448" author="auto" created="Fri, 8 Apr 2011 21:10:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;algernon&apos;, u&apos;name&apos;: u&apos;Gergely Nagy&apos;, u&apos;email&apos;: u&apos;algernon@balabit.hu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-20&quot; title=&quot;Not-null-terminated string support&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-20&quot;&gt;&lt;del&gt;CDRIVER-20&lt;/del&gt;&lt;/a&gt;: bson _append_n functions.&lt;/p&gt;

&lt;p&gt;Added bson_append_string_n, bson_append_symbol_n, bson_append_code_n&lt;br/&gt;
and bson_append_code_w_scope_n, which do the same as their _n-less&lt;br/&gt;
counterparts, except that they take the value of the object to insert&lt;br/&gt;
up to a given length, instead of &apos;till the end of the C string.&lt;br/&gt;
Branch: dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/fc613cf459bbb69e874fe4899cdaad046543d092&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/fc613cf459bbb69e874fe4899cdaad046543d092&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="22174" author="algernon" created="Fri, 7 Jan 2011 19:14:57 +0000"  >&lt;p&gt;I added the neccessary functions (see &lt;a href=&quot;https://github.com/algernon/mongo-c-driver/tree/j/CDRIVER-20&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/algernon/mongo-c-driver/tree/j/CDRIVER-20&lt;/a&gt; ), and sent a pull request aswell.&lt;/p&gt;

&lt;p&gt;string, code, symbol and code_w_scope received an _n variant, those four made sense to me. Tests were added to the test_all_types test case.&lt;/p&gt;</comment>
                            <comment id="22171" author="algernon" created="Fri, 7 Jan 2011 15:35:22 +0000"  >&lt;p&gt;I would like to second this request. Just today, I ran into an issue where I had a string buffer, of which I wanted to insert the first N bytes into a bson buffer, but there was no ready made function for that. I will have a patch ready, that implements _n for the _append functions where it makes sense.&lt;/p&gt;

&lt;p&gt;GitHub pull request will follow soon after.&lt;/p&gt;

&lt;p&gt;For the record, my situation is as follows: I take a string, and find patterns in it, whenever a pattern is found, I record the starting position within the string, and the length. Now, I want to put the matches into mongodb. Either I copy the values, which I really do not want to, or I add the _append_n functions. The latter solution is much more preferable, in my opinion, and there&apos;s plenty of good reasons to want them anyway.&lt;/p&gt;</comment>
                            <comment id="16239" author="viraptor" created="Tue, 27 Jul 2010 23:35:28 +0000"  >&lt;p&gt;Actually, there could also be a version for non-terminated, known-size `name` for every &lt;em&gt;append&lt;/em&gt; function...&lt;/p&gt;</comment>
                    </comments>
                    <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|hrh71j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13940</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>