<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:47 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-295] Allow count to work with query hints</title>
                <link>https://jira.mongodb.org/browse/CXX-295</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description></description>
                <environment></environment>
        <key id="150801">CXX-295</key>
            <summary>Allow count to work with query hints</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="tyler@10gen.com">Tyler Brock</assignee>
                                    <reporter username="barrie">Barrie Segal</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Mon, 4 Aug 2014 21:44:08 +0000</created>
                <updated>Thu, 23 Oct 2014 18:31:32 +0000</updated>
                            <resolved>Fri, 12 Sep 2014 19:45:58 +0000</resolved>
                                                    <fixVersion>legacy-1.0.0-rc1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="718196" author="xgen-internal-githook" created="Fri, 12 Sep 2014 21:15: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-295&quot; title=&quot;Allow count to work with query hints&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-295&quot;&gt;&lt;del&gt;CXX-295&lt;/del&gt;&lt;/a&gt; include all query modifiers in count command&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/3870f932eac501fb2b7e53a42a9c79c697817a80&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/3870f932eac501fb2b7e53a42a9c79c697817a80&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="718092" author="xgen-internal-githook" created="Fri, 12 Sep 2014 19:45:46 +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-295&quot; title=&quot;Allow count to work with query hints&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-295&quot;&gt;&lt;del&gt;CXX-295&lt;/del&gt;&lt;/a&gt; Allow count to work with query hints&lt;br/&gt;
Branch: legacy&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/921a4c6d469b9c0a60f6e88432dfb219a83d7961&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/921a4c6d469b9c0a60f6e88432dfb219a83d7961&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="717303" author="tyler@10gen.com" created="Fri, 12 Sep 2014 00:09:30 +0000"  >&lt;p&gt;Drew, it seems we can take advantage of the fact that Query::hint() had a useless overload that took a string. What I did was repurpose that method to take an index name as opposed to a json string representation of the index spec. This way we can use Query to hold a hint that can either be either an index spec (BSONObj) or index name (std::string). &lt;/p&gt;

&lt;p&gt;This is good because:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;When the query gets unpacked in the _countCmd method we can use either to support current and future server versions.&lt;/li&gt;
	&lt;li&gt;The api isn&apos;t terrible because we avoid adding another parameter to the count method.&lt;/li&gt;
	&lt;li&gt;It fits well with our current design.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="717187" author="tyler@10gen.com" created="Thu, 11 Sep 2014 21:45:04 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/155&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/155&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </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|hs1393:</customfieldvalue>

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