With the release of Studio 3T 5.5.0 comes Query Code, a powerful feature that allows users to convert MongoDB queries to five target languages: JavaScript (Node.js), Java, Python, C#, and the mongo shell language.

That means you can generate driver code from within Studio 3T in four easy steps:

  1. Simply query as you normally would with Query Builder and check that it gives you the desired results. (Hint: With Release 5.4.0, you can now even drag multiple fields at once!)
  2. This time, you’ll notice one very simple (but powerful) tab: Query Code. Click on it.Query Code is the headline feature of Studio 3T Release 5.5.0
  3. Choose your target language from the dropdown. Query Code currently supports Javascript (Node.js), Java (2.x driver API), Python, C#, and mongo shell, but extensions are in the pipeline and we’re open to your suggestions.
    With Query Code you can translate MongoDB queries to your app's native language
  4. Click Copy code to clipboard.Convert MongoDB query to JavaScriptOnce that’s done, paste it into your application – and done! You can of course tweak the code as you like, but Studio 3T’ll take care of the hard work for you from now on.

We hope you enjoy using Query Code! As always, please feel free to drop us a line; we’d love to hear your thoughts. In the meantime, why not read up on SQL querying on MongoDB, another recent headline feature. If SQL doesn’t tickle your fancy, it never hurts to brush up on Studio 3T time-saving tips and best practices.

Happy querying 🙂