<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:44:11 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>[CSHARP-3035] RunCommand API doesn&apos;t support to return a IAsyncCursor&lt;&gt; type</title>
                <link>https://jira.mongodb.org/browse/CSHARP-3035</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Currently, the runcommand API in MongoDatabaseImpl class doesn&apos;t support to return a IAsyncCursor&amp;lt;&amp;gt; type. In many advanced scenario, such as dynamic query, we need runcommand API to return a cursor. So I wonder when the csharper driver shall provide this feature like the go driver in &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/master/mongo/database.go&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/blob/master/mongo/database.go&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1298045">CSHARP-3035</key>
            <summary>RunCommand API doesn&apos;t support to return a IAsyncCursor&lt;&gt; type</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="13202">Works as Designed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="lxyqwd@163.com">Aiolos Wong</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Mar 2020 07:09:43 +0000</created>
                <updated>Fri, 27 Oct 2023 13:24:52 +0000</updated>
                            <resolved>Mon, 18 May 2020 14:53:48 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3060294" author="jeff.yemin" created="Wed, 29 Apr 2020 13:38:13 +0000"  >&lt;p&gt;I do mean the methods in &lt;tt&gt;IMongoCollection&lt;/tt&gt;. There is no reason I can think of why a script couldn&apos;t &lt;a href=&quot;http://mongodb.github.io/mongo-csharp-driver/2.10/reference/driver/crud/reading/#finding-documents&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;call the find method with a dynamic query filter&lt;/a&gt; or similar but with an aggregation pipeline, rather than using RunCommand directly.&lt;/p&gt;</comment>
                            <comment id="3059989" author="lxyqwd@163.com" created="Wed, 29 Apr 2020 08:05:47 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I checked the source code of the MongoDB csharp driver and found only a private type FindHelper method, nothing about the AggregateHelper method. Do you mean to use the the Find/Aggregate method in IMongoCollection&amp;lt;&amp;gt;? I think what you say about fetching data with a BsonDocument to specify the filter is&#160;feasible in most scenarios. But my current reqirement is the ability to execute scripts. Let&apos;s say we are developing a data center software and we need to quickly generate various APIs to meet the business requirements for reading data. The users of this feature are developers, not customers. How do we quickly implement this feature? Since the developer understands MongoDB&apos;s command query language, he can directly specify a command to get data like the sample in &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/find/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/command/find/&lt;/a&gt;&#160;and &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/aggregate/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/command/aggregate/.&lt;/a&gt; If the RunCommand API can return an IAsyncCursor&amp;lt;&amp;gt; type, then developers can&#160;easily get the desired data with strong scalability.&lt;/p&gt;</comment>
                            <comment id="3030869" author="jeff.yemin" created="Wed, 8 Apr 2020 13:03:05 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lxyqwd%40163.com&quot; class=&quot;user-hover&quot; rel=&quot;lxyqwd@163.com&quot;&gt;lxyqwd@163.com&lt;/a&gt; for the information.  But I am still not clear why you can&apos;t use the aggregate or find helper method, and build up the filter based on the criteria.  Either way, you can use a BsonDocument to specify the filter, so I don&apos;t quite see the advantage of RunCommand.  There is also quite a bit of behavior that the helper methods provide over RunCommand.  In particular, the driver will do automatic retries of failed aggregate or find when using the helpers, but not when using RunCommand.&lt;/p&gt;</comment>
                            <comment id="3030586" author="lxyqwd@163.com" created="Wed, 8 Apr 2020 02:59:03 +0000"  >&lt;p&gt;Hi&#160;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For instance, let&apos;s say we were developing a software like Power BI, which needs to read data from MongoDB to generate charts and reports. The customer can select some fields from any collection by using some criterias to filter and aggreate the data. In this scenario, we need to generate a command based on the user&apos;s choice and send it to MongoDB to get the data.&lt;/p&gt;</comment>
                            <comment id="3027320" author="jeff.yemin" created="Mon, 6 Apr 2020 14:43:08 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lxyqwd%40163.com&quot; class=&quot;user-hover&quot; rel=&quot;lxyqwd@163.com&quot;&gt;lxyqwd@163.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for the request.  Can you provide some more specifics about what you mean by &quot;dynamic query&quot;?  We&apos;d like to understand the use case a bit better before committing to a new public API.&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|hx04rr:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>