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

I was interested in RethinkDB when I read the 2.0 release. But after looking at that mess he had to do to write a simple query. No thanks, I'll stick with Mongodb.

   db.catalog.find({ 'details.media_type_id': 2 })



In RethinkDB you'd express it like this:

  r.table('catalog').filter({ details: { media_type: 2}})
Or like this:

  r.table('catalog').filter(r.row('details')('media_type').eq(2))

For most queries MongoDB syntax and RethinkDB syntax are effectively interchangeable.


What do you do when a document has a period in its key?


Restrictions on Field Names Field names cannot contain dots (i.e. .) or null characters, and they must not start with a dollar sign

http://docs.mongodb.org/manual/reference/limits/#Restriction...




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

Search: