News for hackers. Stuff that matters.
Re:What MongoDB got right by dbattaglia on Friday November 13, 2015 @08:05AM (#10559583)
Maybe I'm weird and just like SQL but the query-as-data aspect of Mongo is actually my least favorite aspect of using it. Ad-hoc queries become torture, as do complicated queries. I might just be lucky to have used SQL Server and C# for so long which eases a lot of the pains you described.
Re:What MongoDB got right by lloyd-christmas on Friday November 13, 2015 @03:22PM (#10562174)
It's pretty easy to build wrappers for things like that, though. Build a constructor that has instances methods of just doing `myQueryInstance.addEqualsQuery(key, value)`. You can then just pass it around and add to the query instance as it moves around, deconstructing it at your database access point.
Re:What MongoDB got right by meowface on Friday November 13, 2015 @10:06AM (#10560174)
Same. I wish there was a DSL layer on top.
Re:What MongoDB got right by leothekim on Friday November 13, 2015 @10:38AM (#10560365)
If you use Scala and mongodb, I highly recommend this DSL:

https://github.com/foursquare/rogue

Typesafe queries using SQL-like syntax. Particularly when used with the Spindle library (https://github.com/foursquare/spindle), this is best ORM I've ever used.

Re:What MongoDB got right by meowface on Friday November 13, 2015 @07:28PM (#10563561)
That does look very nice. I've never actually used Scala seriously, but coincidentally have been learning how to use it all this week. I'm even more interested, now.
Re:What MongoDB got right by meowface on Friday November 13, 2015 @07:28PM (#10563562)
That does look very nice. I've never actually used Scala seriously, but coincidentally have been learning how to use it all this week. I'm even more interested, now.