Join in RethinkDB -
how join multiple conditions , use aggregate function in rethink-db
r.table("yourtable").get(id).innerjoin( r.table("secondtable"),function (up, upp) { return user_profile("mid") }).map({ uid: r.row("left")("userid"), mid: r.row("left")("memberid"), pid: r.row("right")("projectid"), nodeid: r.row("right")("nodeid"), pri: r.row("right")("priority") }) .min("priority");
r.table("tblname1").get(id).innerjoin( r.table("tblname2"), function (tbl1, tbl2) { return tbl1("userid").eq(tbl2("userid")); })
Comments
Post a Comment