<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:39 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-1098] db.Eval(evalArgs) not working from c sharp</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1098</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Hi,&lt;br/&gt;
I am unable to work with db.Eval function.&lt;br/&gt;
After passing BsonDocument in EvalArgs, it throws &quot;type cast error&quot;.&lt;/p&gt;

&lt;p&gt;My code:&lt;br/&gt;
EvalArgs ea = new EvalArgs();&lt;br/&gt;
 BsonJavaScript bjs = new BsonJavaScript(&quot;function() &lt;/p&gt;
{ return db.bar.count(); }
&lt;p&gt;&quot;);&lt;br/&gt;
ea.Code = bjs;&lt;br/&gt;
db.Eval(ea);&lt;/p&gt;

&lt;p&gt;This returns nothing, while the code runs in mongo shell when directly executed.&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Anurag&lt;/p&gt;</description>
                <environment>Windows</environment>
        <key id="167616">CSHARP-1098</key>
            <summary>db.Eval(evalArgs) not working from c sharp</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="anuaquarius">Anurag</reporter>
                        <labels>
                            <label>question</label>
                    </labels>
                <created>Thu, 6 Nov 2014 04:22:04 +0000</created>
                <updated>Fri, 5 Apr 2019 13:58:28 +0000</updated>
                            <resolved>Sat, 4 Apr 2015 22:47:38 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="757822" author="craiggwilson" created="Thu, 6 Nov 2014 16:11:08 +0000"  >&lt;p&gt;Hi. Sorry you are having trouble. I&apos;ll look into this. In the meantime, could you explain why you need &quot;eval&quot;? In general, it has some very bad effects on the server regarding performance and, in almost all cases, isn&apos;t actually needed. Perhaps you could explain what you are trying to do and we can come up with a better solution.&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|hs3pm7:</customfieldvalue>

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