<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:41:25 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>[DOCS-1595] Table listing JS equivalents of non-JS shell helpers</title>
                <link>https://jira.mongodb.org/browse/DOCS-1595</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;The documentation page on &lt;a href=&quot;http://docs.mongodb.org/manual/tutorial/write-scripts-for-the-mongo-shell/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Write Scripts for the mongo Shell&lt;/a&gt; mentions that you cannot include &lt;tt&gt;use &amp;lt;dbname&amp;gt;&lt;/tt&gt; inside a JavaScript file, but does not have a full list of equivalent JS for other interactive helpers such as &quot;show dbs&quot;.&lt;/p&gt;

&lt;p&gt;We should include a table mapping these, for example:&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Shell helper&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;JavaScript equivalent&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;show dbs&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;db.adminCommand(&apos;listDatabases&apos;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;show collections&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;db.getCollectionNames()&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;show users&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;db.system.users.find()&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;show log &amp;lt;logname&amp;gt;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;db.adminCommand(
{&apos;getLog&apos;: &apos;&amp;lt;logname&amp;gt;&apos;}
&lt;p&gt;)&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;use &amp;lt;db_name&amp;gt;&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;db.getSiblingDB(&apos;&amp;lt;db_name&amp;gt;&apos;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;It is also worth noting that in non-interactive mode (i.e. &lt;tt&gt;--eval&lt;/tt&gt;) these commands will return the corresponding JavaScript data, but will not display any output.  The &lt;tt&gt;printjson()&lt;/tt&gt; function can be used to display the results of a JavaScript function, for example: &lt;tt&gt;printjson(db.adminCommand(&apos;listDatabases&apos;))&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;This should probably also be cross-referenced from &lt;a href=&quot;http://docs.mongodb.org/manual/core/server-side-javascript/#running-js-scripts-in-mongo-on-mongod-host&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Running .js files via a mongo shell Instance on the Server&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="78543">DOCS-1595</key>
            <summary>Table listing JS equivalents of non-JS shell helpers</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="allison.moore@mongodb.com">Allison Reinheimer Moore</assignee>
                                    <reporter username="stephen.steneker@mongodb.com">Stennie Steneker</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Jun 2013 23:07:58 +0000</created>
                <updated>Mon, 30 Oct 2023 21:53:29 +0000</updated>
                            <resolved>Tue, 9 Jul 2013 13:44:12 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>Server</component>
                        <due></due>
                            <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="377365" author="auto" created="Tue, 9 Jul 2013 19:35:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;schmalliso&apos;, u&apos;name&apos;: u&apos;schmalliso&apos;, u&apos;email&apos;: u&apos;allison.moore@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-1595&quot; title=&quot;Table listing JS equivalents of non-JS shell helpers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-1595&quot;&gt;&lt;del&gt;DOCS-1595&lt;/del&gt;&lt;/a&gt; adding table mapping helpers to their javascript equivalents&lt;/p&gt;

&lt;p&gt;Signed-off-by: Sam Kleinman &amp;lt;samk@10gen.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/5a7415d401ab1e7c50e9f7aeddc8473b2afc6b88&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/5a7415d401ab1e7c50e9f7aeddc8473b2afc6b88&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="376719" author="auto" created="Tue, 9 Jul 2013 00:43:51 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;tychoish&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-1595&quot; title=&quot;Table listing JS equivalents of non-JS shell helpers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-1595&quot;&gt;&lt;del&gt;DOCS-1595&lt;/del&gt;&lt;/a&gt;: syntax fixes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/fd8a46a389db5dc3b3ae607eced038d82292f54b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/fd8a46a389db5dc3b3ae607eced038d82292f54b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="376718" author="auto" created="Tue, 9 Jul 2013 00:43:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;schmalliso&apos;, u&apos;name&apos;: u&apos;schmalliso&apos;, u&apos;email&apos;: u&apos;allison.moore@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-1595&quot; title=&quot;Table listing JS equivalents of non-JS shell helpers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-1595&quot;&gt;&lt;del&gt;DOCS-1595&lt;/del&gt;&lt;/a&gt; adding table mapping helpers to their javascript equivalents&lt;/p&gt;

&lt;p&gt;Signed-off-by: Sam Kleinman &amp;lt;samk@10gen.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/3f8bc03777cdffd35f4827e940cefac863e77672&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/3f8bc03777cdffd35f4827e940cefac863e77672&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="42739">SERVER-6237</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 19 Jun 2013 21:01:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 32 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 32 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>allison.moore@mongodb.com</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrrumn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrr2mf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>71782</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnjfb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>