Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
失败的Java筛选游标_Java_Filter_Cursor_Rethinkdb - Fatal编程技术网

失败的Java筛选游标

失败的Java筛选游标,java,filter,cursor,rethinkdb,Java,Filter,Cursor,Rethinkdb,非常类似于游标问题,只是我的代码不起作用。光标为空。筛选器代码段如下所示: Cursor cursor = r.table(tableName) .filter(row -> row.g(filterKey).eq(filterValue)) .run(conn); 其中filterKey=“type”和filterValue=“AffiliationGraphType” 下面是要查找的示例行: { “inE”:{}, “i

非常类似于游标问题,只是我的代码不起作用。光标为空。筛选器代码段如下所示:

Cursor cursor = r.table(tableName)
                .filter(row -> row.g(filterKey).eq(filterValue))
                .run(conn);
其中
filterKey=“type”
filterValue=“AffiliationGraphType”

下面是要查找的示例行:

{
“inE”:{},
“inEID”:[“57d93bfd-fd70-44d4-9749-9a651987e60d”,“c1a3b465-0ee5-4280-ab07-99782037b9aa”],
“outE”:{},
“id”:“16321.柏林.阿莱马涅”,
“标签”:“16321,柏林贝诺北,阿莱马涅。”,
“类型”:“图形类型”
}
我的代码看起来就像链接的代码,但它没有得到任何点击。如何改进这段代码?

我意识到(!)JSON数据本身在内部映射中的键“cargo”下,因此修复方法是:

 .filter(row -> row.g("cargo").g(filterKey).eq(filterValue))