How to use left join of sql in Rethinkdb ReQL with secondary index? -


i have 2 table a , bi use left join in sql means content of , common content of b. tried use outer join like:

r.table("a").outerjoin(r.table("b"),function(a,b){       return a("id")==b("anotherfield")("joinfield") }) 

but query slow there no index in table b. how can use secondary index when querying outerjoin?

equivalent sql

select * left join a.id = b.other_field_join 

you can map here: r.table('a').map(function(row) { return {left_row: row, right_rows: r.table('b').getall(row('id'), {index:'idx'})}; })


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -