RethinkDB: RIGHT JOIN Example

RethinkDB has a function called “outerJoin”, which actually does a left join. For example, this finds users and adds their audit trail history (if any): r.db(‘test’) .table(‘user_actions’) .outerJoin(r.table(‘users’), (action, user) => action(‘user_id’).eq(user(‘id’))) .zip() If instead you want to start with audit history and add users (if they exist) you have to swap everything manually, since …