3 ms·
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
by dbattaglia 11y ago
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.
- meowface 11y agoSame. I wish there was a DSL layer on top.
- leothekim 11y agoIf you use Scala and mongodb, I highly recommend this DSL: https://github.com/foursquare/rogue https://github.com/foursquare/rogue Typesafe queries using SQL-like syntax. Particularly when used with the Spindle library (https://github.com/foursquare/spindle https://github.com/foursquare/spindle), this is best ORM I've ever used.
- meowface 11y agoThat 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.
- meowface 11y agoThat 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.
- lloyd-christmas 11y agoIt'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.