i have this query:
r.db('test').table('users').getAll("amazon_11",{index:"parent"})
.innerJoin(r.table("posts"),function (posts, user) {return posts("employeeId").eq(user("employeeId"));}).zip()
.innerJoin(r.table("posts_facebook"),function(left,right){return left('id').eq(right('post_id'))}).zip()
i want to add a condition on the timestamp field in the collection posts_facebook
.
I have created an index on the timestamp field.
This is what my guess was :
r.db('test').table('users').getAll("amazon_11",{index:"parent"})
.innerJoin(r.table("posts"),function (posts, user) {return posts("employeeId").eq(user("employeeId"));}).zip()
.innerJoin(r.table("posts_facebook"),function(left,right){return left('id').eq(right('post_id'))}).zip()
.between(fromDate,toDate,{index:"approvedAt"})
Error received from rethinkdb is as follows:
e: Expected type TABLE_SLICE but found SEQUENCE: VALUE SEQUENCE in:
r.db("test").table("users").getAll("amazon_11", {"index": "parent"}).innerJoin(r.table("posts"), function(var_43, var_44) { return var_43("employeeId").eq(var_44("employeeId")); }).zip().innerJoin(r.table("posts_facebook"), function(var_45, var_46) { return var_45("id").eq(var_46("post_id")); }).zip().between("2016-08-01 11:31:40", "2016-08-01 11:32:00", {"index": "approvedAt"})
The date format is : YYYY-MM-DD h:i:s