我在RethinkDB文档中浏览了Map / Reduce示例。我有一些看起来像这样的文件:
{
"category": "Fiction" ,
"content": "This far, no further!" ,
"id": "0fc5339b-8139-4996-8979-88a0051195e3" ,
"title": "The line must be drawn here"
}
当我按照示例使用Data Explorer时。例如
r.table('posts').map(lambda post: 1)
我收到此错误:
SyntaxError: missing ) after argument list
这是因为数据浏览器仅允许JavaScript作为输入。您需要切换到这样的方式才能使其工作:
r.table('posts').map(function(post){return 1})
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句