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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -