0

I am trying to execute the code proposed by in this answer on stackoverflow from Scala.

In this answer, it is shown how to do this using Casbah; but as far as I have understood, Casbah is deprecated, and the mongo-scala-driver should be used.

How do I execute a custom code as the one proposed from scala?

Community
  • 1
  • 1
navige
  • 2,447
  • 3
  • 27
  • 53

1 Answers1

1

I suggest you use Reactive Mongo, this Drive is Asynchronous & Non-Blocking by default. And for a best performance try to execute your query on the Mongo side not on Scala side.

juanitodread
  • 156
  • 2
  • 7
  • Thank you! I found how to add the script on the Mongo side, but still how can I call it from scala? – navige Dec 08 '15 at 13:42
  • It's a query right? You should be able to run as a mongo query through the mongo driver. It would be useful see what do you have. – juanitodread Dec 08 '15 at 17:39