Suppose I have the following table in RethinkDB:
I would like to query based on a list of IDs, for example the first two. It seems like the getAll function should do this, but I can't seem to get it to work:
The query returns no results, even though I copy-pasted the IDs from those shown on the previous screen grab. Is this not the correct way to use getAll
?
You should use args for this:
r.db("sensor_db).table("sensor_data").getAll(r.args([id1, id2]))
or you can write query without []
:
r.db("sensor_db).table("sensor_data").getAll(id1, id2,...)