数据本身只是电影的名称和相应的昵称。在 neo4j 浏览器中,在 code>response 下,它会返回:
{
"keys": [
"n.name",
"n.Nickname"
],
"length": 2,
"_fields": [
"Titanic",
[
"Iceburg Movie"
]
],
"_fieldLookup": {
"n.name": 0,
"n.Nickname": 1
}
},
{
"keys": [
"n.name",
"n.NickName"
],
"length": 2,
"_fields": [
"Jurrasic Park",
[
"Dinosaur Movie"
]
],
"_fieldLookup": {
"n.name": 0,
"n.Nickname": 1
}
},
{
"keys": [
"n.name",
"n.Nickname"
],
"length": 2,
"_fields": [
"Fast and Furious",
[
"Car Movie",
"Race Movie",
"Drag Race Movie"
]
],
"_fieldLookup": {
"n.name": 0,
"n.Nickname": 1
}
}
我在 Neo4j 浏览器中测试了下面的密码,它完全符合我的要求。问题是我似乎无法在我的 C# 应用程序中获取该数据。
using (ISession session = driver.Session())
{
IStatementResult result = session.Run("match (n:movie) " +
"where ANY(name IN n.Nickname where name contains \"" + Nickname + "\")" +
"return n.name, n.Nickname");
}
return result;
我真的只想要值和键,但我可以获得任何形式的数据的任何方式都会有所帮助。