sorting and limiting data in mongo db query tool in soatest?

sohail611710sohail611710 Posts: 3

How to sort and limit data in mongo db query tool in soatest?


  • benken_parasoftbenken_parasoft Posts: 776 ✭✭✭
    edited May 2018

    There is no specific option in the MongoDB Query Tool to sort or limit the documents that are returned from executing the query. The tool could perhaps be enhanced to have something like this, since I do see both sort and limit methods in their client api. You would have to make a formal enhancement request to your Parasoft technical account representative.

    However, there are always other ways to accomplish things, where you could sort the results outside the MongoDB Query Tool with something else. For example, you could chain an XML Converter and XML Sort tool or you could sort the results yourself with a custom script from an Extension tool.

  • sohail611710sohail611710 Posts: 3

    Actually collcetion has more than 60000 records... So we are not sble retrieve the data.. as it throws java heap error.
    And about client api... we dont have access to add or delete from ctp(soatest server)...

  • benken_parasoftbenken_parasoft Posts: 776 ✭✭✭

    Just so you know, I was referring to the MongoDB Client Java API, not CTP or SOAtest REST APIs. This is the Java API used internally by the MongoDB Query Tool. The reason I pointed this out was to make the point that what you are asking happens to be natively supported by the MongoDB Client. Therefore, requesting such an enhancement to the MongoDB Query Tool seems very reasonable. I highly recommend that you contact your Parasoft technical account representative and make a formal feature request.

    For now, the only other alternative I can recommend would be to write a custom script to perform this particular query. If you were to use the MongoDB Client API from your own script, you can programmatically set the limit and sort.

Sign In or Register to comment.