I want to save a javascript code as store function via Java API. The problem is that I don't know how to convert String (type 2) to code (type 13). I know that in PHP it's possible:
new mongo.Code("function myFunction() { return 123; }").
So is there any way to save stored function via Java API?