<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:15 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-940] Add ability to access sort, skip, limit, etc... for a LINQ query.</title>
                <link>https://jira.mongodb.org/browse/CSHARP-940</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Consider either of the following:&lt;/p&gt;

&lt;p&gt;MongoQueryable&amp;lt;T&amp;gt; mongoQuery = query as MongoQueryable&amp;lt;T&amp;gt;;&lt;br/&gt;
if (mongoQuery != null)&lt;br/&gt;
	return mongoQuery.GetMongoQuery();&lt;/p&gt;

&lt;p&gt;MongoCursor&amp;lt;T&amp;gt; mongoCursor = query as MongoCursor&amp;lt;T&amp;gt;;&lt;br/&gt;
if (mongoCursor != null)&lt;br/&gt;
	return mongoCursor.Query;&lt;/p&gt;

&lt;p&gt;Calling ToString on either mongoQuery.GetMongoQuery() or mongoCursor.Query. It will return the where clause of a query. But as far as I can tell, there is no way to access other parts of the query such as sort, limit, skip, projects, etc.&lt;/p&gt;

&lt;p&gt;So if I had:&lt;/p&gt;

&lt;p&gt;var query =&lt;br/&gt;
   (from p in people&lt;br/&gt;
   where p.age &amp;gt; 21&lt;br/&gt;
   orderby p.Name descending)&lt;br/&gt;
   .Skip(20)&lt;br/&gt;
   .Take(10)&lt;/p&gt;

&lt;p&gt;The query part is {age: {$gt: 21} } but I haven&apos;t found a way to access the rest of the query. Am I missing it or is this aspect inaccessible from the outside?&lt;/p&gt;</description>
                <environment></environment>
        <key id="124746">CSHARP-940</key>
            <summary>Add ability to access sort, skip, limit, etc... for a LINQ query.</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="-1">Unassigned</assignee>
                                    <reporter username="mkennedy66996693">Michael Kennedy</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Mar 2014 16:25:09 +0000</created>
                <updated>Wed, 22 Apr 2015 15:22:52 +0000</updated>
                            <resolved>Wed, 22 Apr 2015 15:22:52 +0000</resolved>
                                    <version>1.8.3</version>
                                    <fixVersion>2.1</fixVersion>
                                    <component>Linq</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="895011" author="craiggwilson" created="Wed, 22 Apr 2015 15:22:52 +0000"  >&lt;p&gt;Michael,&lt;/p&gt;

&lt;p&gt;We are only targeting the aggregation framework with the LINQ rewrite. As such, you&apos;ll have access to all the generated stages of the pipeline as BsonDocuments which will obviously include the skips and limits. I&apos;ll be working on documentation shortly to demonstrate how to extract this information.&lt;/p&gt;

&lt;p&gt;CRaig&lt;/p&gt;</comment>
                            <comment id="681137" author="mkennedy66996693" created="Mon, 4 Aug 2014 22:22:26 +0000"  >&lt;p&gt;Great, thanks Craig!&lt;/p&gt;</comment>
                            <comment id="681127" author="craiggwilson" created="Mon, 4 Aug 2014 22:13:37 +0000"  >&lt;p&gt;Forgot all these things were public &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Our springs are 3 weeks long and we are 1 week into Sprint 6, so roughly 5 weeks from now that&apos;ll start.&lt;/p&gt;</comment>
                            <comment id="681124" author="mkennedy66996693" created="Mon, 4 Aug 2014 22:12:30 +0000"  >&lt;p&gt;Craig,&lt;/p&gt;

&lt;p&gt;I&apos;m seeing a lot of features I&apos;ve requested making it into Sprint 8. That&apos;ll be awesome. Do you have a time frame for sprint 8?&lt;/p&gt;</comment>
                            <comment id="521848" author="mkennedy66996693" created="Mon, 24 Mar 2014 16:57:05 +0000"  >&lt;p&gt;Thank you Craig!&lt;/p&gt;</comment>
                            <comment id="521836" author="craiggwilson" created="Mon, 24 Mar 2014 16:34:14 +0000"  >&lt;p&gt;Thanks Mike.  This is definitely planned in the Linq rewrite and, I believe is already there, so this is definitely important.  We&apos;ll keep this open to track it and so you can verify once we publish an early release of the feature.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
CRaig&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CSHARP-935</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrwijz:</customfieldvalue>

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