4 ms·
db.webhooks.find({ "events": { $exists: true, $ne: [], $elemMatch: { "links.cancelInvoice": {$exists: true}} } }) What is this, I don't even.
by madeuptempacct 8y ago
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.
- yoklov 8y agoHonestly 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.
- zongitsrinzler 8y agoI 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.
- qaq 8y agoThat was actually a very smart decision as sql parsers are actually hard to write so they saved a ton of dev time.
- dominotw 8y agoThere are couple of apache projects like calcite that are being used of new db companies like mapd.
- erik_seaberg 8y agoCode 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.