rql get multiple documents from list of keys rethinkdb in javascript

后端 未结 4 1965
广开言路
广开言路 2021-01-05 00:16

I have a table of \"person\" data, which has a unique key \"id\". I have a list of id\'s that I want to get the data for which I\'ll be sending as a JSON array from the cli

4条回答
  •  攒了一身酷
    2021-01-05 00:18

    You can use .expr with .map for a cleaner alternative to .eqJoin

    r.expr(array).map(function(id) {
      return r.table('user').get(id);
    });
    

提交回复
热议问题