Closed chrisabrams closed 8 years ago
I'm trying to write a query like this:
const done = true let query = r.table('games').getAll(r.args['chess', 'checkers'], {index: 'type'}) if(done) { query.filter({ status: 'done' }) } const res = await query.run()
However, the filter part of the query is not executed. If I console.log query, it doesn't have the filter part. Is is possible to conditionally chain extra pieces of the query?
query
Disregard. I need to take a break for the day :O
I'm trying to write a query like this:
However, the filter part of the query is not executed. If I console.log
query
, it doesn't have the filter part. Is is possible to conditionally chain extra pieces of the query?