<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:08 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>[CXX-80] Online Array example is not working</title>
                <link>https://jira.mongodb.org/browse/CXX-80</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;Hallo,&lt;/p&gt;

&lt;p&gt;I am using Mongo 2.08 with Visual C++ 2010 on Win Xp.&lt;/p&gt;

&lt;p&gt;I need to add very large arrays, up to 6400 datapoints to my database. The data contained represent an FFT result which is then stored along with other data. My problem refers to adding such a large array. I worked through the array example but just adding each value with the &quot;&amp;lt;&amp;lt;&quot; operator of C++ is cumbersome and cout allows only 256 values if I remember correctly.&lt;/p&gt;

&lt;p&gt;In the array example on mongodb.org the follow lines make an exception&lt;/p&gt;

&lt;p&gt;vector&amp;lt;be&amp;gt; a = an_obj&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;x&amp;quot;&amp;#93;&lt;/span&gt;.Array();&lt;br/&gt;
I am getting as output &lt;br/&gt;
&quot;Mon Feb 18 10:03:52 dev: lastError==0 won&apos;t report:field not found, expected typ&lt;br/&gt;
e 4&quot;&lt;/p&gt;

&lt;p&gt;Obviously what is passed to it in the example is not seen as an array.&lt;/p&gt;

&lt;p&gt;In the other direction the line (Obj to vector conversion)&lt;/p&gt;

&lt;p&gt;bo myarray = an_obj&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;x&amp;quot;&amp;#93;&lt;/span&gt;.Obj();&lt;/p&gt;

&lt;p&gt;I am getting as output the exception again and error in the command window stating:&lt;br/&gt;
&quot;Mon Feb 18 10:08:35 dev: lastError==0 won&apos;t report:invalid parameter: expected a&lt;br/&gt;
n object ()&quot;&lt;/p&gt;

&lt;p&gt;It compiles fine but does not run. I think if this could be made to work I should be able to make some progress again.&lt;/p&gt;

&lt;p&gt;Can someone please check that the array example also actually works?&lt;/p&gt;</description>
                <environment>C++ with Visual Studio 2010 on Win XP</environment>
        <key id="65708">CXX-80</key>
            <summary>Online Array example is not working</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="tyler@10gen.com">Tyler Brock</assignee>
                                    <reporter username="adriaanb1">Adriaan Bredekamp</reporter>
                        <labels>
                            <label>cxxmove</label>
                            <label>driver</label>
                            <label>legacy-cxx</label>
                            <label>windows</label>
                    </labels>
                <created>Tue, 19 Feb 2013 11:01:44 +0000</created>
                <updated>Thu, 10 Apr 2014 18:09:43 +0000</updated>
                            <resolved>Thu, 13 Mar 2014 15:36:20 +0000</resolved>
                                                    <fixVersion>legacy-0.0-26compat-2.6.0-rc2</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="514798" author="xgen-internal-githook" created="Wed, 12 Mar 2014 22:38:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;TylerBrock&apos;, u&apos;name&apos;: u&apos;Tyler Brock&apos;, u&apos;email&apos;: u&apos;tyler.brock@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-80&quot; title=&quot;Online Array example is not working&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-80&quot;&gt;&lt;del&gt;CXX-80&lt;/del&gt;&lt;/a&gt; add arrayExample to gitignore&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/ae9703d06fb7da5548ac088009a2b2a7485c69f8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/ae9703d06fb7da5548ac088009a2b2a7485c69f8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="514510" author="tyler@10gen.com" created="Wed, 12 Mar 2014 19:42:34 +0000"  >&lt;p&gt;Hey Adriaan, I&apos;ve added a better array example using some of the things I mentioned above to the source code of the repository and we are going to replace the old example that you found on the web with this one.&lt;/p&gt;

&lt;p&gt;Please let me know if this has helped.&lt;/p&gt;</comment>
                            <comment id="514506" author="xgen-internal-githook" created="Wed, 12 Mar 2014 19:39:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;TylerBrock&apos;, u&apos;name&apos;: u&apos;Tyler Brock&apos;, u&apos;email&apos;: u&apos;tyler.brock@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-80&quot; title=&quot;Online Array example is not working&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-80&quot;&gt;&lt;del&gt;CXX-80&lt;/del&gt;&lt;/a&gt; make the example a bit more interesting&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/2a9474086b30a5a4140f5f094e77bc0dd9d87354&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/2a9474086b30a5a4140f5f094e77bc0dd9d87354&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="514505" author="xgen-internal-githook" created="Wed, 12 Mar 2014 19:39:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;TylerBrock&apos;, u&apos;name&apos;: u&apos;Tyler Brock&apos;, u&apos;email&apos;: u&apos;tyler.brock@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-80&quot; title=&quot;Online Array example is not working&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-80&quot;&gt;&lt;del&gt;CXX-80&lt;/del&gt;&lt;/a&gt; minor changes&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/aa56996c278913ee6cf742a65e116fa9bc62c0f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/aa56996c278913ee6cf742a65e116fa9bc62c0f3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="514504" author="xgen-internal-githook" created="Wed, 12 Mar 2014 19:39:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;TylerBrock&apos;, u&apos;name&apos;: u&apos;Tyler Brock&apos;, u&apos;email&apos;: u&apos;tyler.brock@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-80&quot; title=&quot;Online Array example is not working&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-80&quot;&gt;&lt;del&gt;CXX-80&lt;/del&gt;&lt;/a&gt; adapt existing array example from psuedo code&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/703700c501fea7f7518cf415495ceada95fd770b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/703700c501fea7f7518cf415495ceada95fd770b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="514374" author="tyler@10gen.com" created="Wed, 12 Mar 2014 18:00:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/22&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/22&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="509202" author="tyler@10gen.com" created="Tue, 4 Mar 2014 19:07:21 +0000"  >&lt;p&gt;If you&apos;d like to avoid inserting it you can alternatively print it out by calling &lt;tt&gt;bob.obj().toString()&lt;/tt&gt;&lt;/p&gt;</comment>
                            <comment id="509169" author="tyler@10gen.com" created="Tue, 4 Mar 2014 18:37:42 +0000"  >&lt;p&gt;Hi Adriaan,&lt;/p&gt;

&lt;p&gt;If you want to avoid using the macros you can do something like this to build up the array:&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;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// create a BSON object builder&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;BSONObjBuilder bob(64);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// create an array builder&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;BSONArrayBuilder bab;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// put some numbers into the array&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;bab.append(1);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;bab.append(123);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// append the array to the BSON object using the key &quot;array&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;bob.appendArray(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;array&quot;&lt;/span&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;, bab.arr());&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// insert the BSON object&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;c.insert(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;test.collection&quot;&lt;/span&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;, bob.obj());&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="281469" author="gjmurakami" created="Tue, 5 Mar 2013 03:17:37 +0000"  >&lt;p&gt;Note that this is a C++ driver issue, distinctly different from the C driver.  The C++ driver is part of the Core Server, and this issue should probably be moved there.&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|hrm8rr:</customfieldvalue>

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