0

数据本身只是电影的名称和相应的昵称。在 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;

我真的只想要值和键,但我可以获得任何形式的数据的任何方式都会有所帮助。

4

1 回答 1

0

In C#, a variable (like result) is not available outside of the code block (surrounded by braces, { }) that it is defined in.

于 2019-06-12T20:43:34.293 回答