Hacker News new | past | comments | ask | show | jobs | submit login

db.webhooks.find({ "events": { $exists: true, $ne: [], $elemMatch: { "links.cancelInvoice": {$exists: true}} } })

What is this, I don't even. Mongo is a huge pain when it comes to searching nested arrays. And above is just an array in an object, not multiple levels of nesting. I have to re-learn the syntax every time I pick it up.

Other than that, it worked great for allowing users to build completely custom forms.




Honestly that doesn't look that bad. SQL is a lot weirder in many ways, and I say that as someone who has written a lot of SQL.


I have to agree. Basic search and replace queries are very readable in Mongo and very easily constructable. Imo the advantage of SQL queries shows the best when having to do complex aggregation in Mongo.


That was actually a very smart decision as sql parsers are actually hard to write so they saved a ton of dev time.


There are couple of apache projects like calcite that are being used of new db companies like mapd.


It's not really a big deal either way. If you have some experience with parsers/compilers, SQL parsers are pretty trivial. If you don't, there is one in SQLite.


Calcite looks like a really useful project


Code is data. I'm surprised to see developers willing to adopt "there is no custom grammar, just create this data structure" after how poorly Lisp was received.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: