我有一个 ReQL 查询...
r.db('development').table('responses').filter({
survey_id: 9
}).concatMap(r.row.getField('numerical_answers')).filter({
type: 'CustomerEffortAnswer'
}).sum('number')
...我想在NoBrainer中工作,因为我似乎无法让它在 Ruby on Rails 上工作。当我尝试像这样在 Rails 中运行 ReQL 时......
NoBrainer.run do |r|
return_count = r.db('development').table('responses').filter({ survey_id: id }).concatMap(r.row.getField('numerical_answers')).filter({type: 'CustomerEffortAnswer'}).sum('number')
end
...我得到错误:
Sorry, r.row is not available in the ruby driver. Use blocks instead.