代码之家  ›  专栏  ›  技术社区  ›  Srinath Ganesh

aws neptune-提交带有空字符串的查询时崩溃

  •  2
  • Srinath Ganesh  · 技术社区  · 6 年前

    脚本 " " (有空的空间)可以工作,但是 "" 空字符串崩溃。

    gremlin> g.addV("Test").property("title", "Test node 1").property("a", "")
    {"requestId":"111xxxx-xxx-xxx-xxx-xxx","code":"MalformedQueryException","detailedMessage":"Query parsing failed at line 1, character position at 62, error message : no viable alternative at input 'g.addV(\"Test\").property(\"title\",\"Test node 1\").property(\"a\",\"\"'"}
    Type ':help' or ':h' for help.
    Display stack trace? [yN]
    
    
    gremlin> g.addV("Test").property("title", "Test node 1").property("a", " ")
    ==>v[98b22f0f-6be0-fb11-38cc-066bf7e17051]
    

    这对Neo4J Gremlin很好,所以我怀疑这是一个Gremlin的问题。这是海王星的虫子还是特写?

    1 回复  |  直到 6 年前
        1
  •  1
  •   stephen mallette    6 年前

    我想这是海王星的一个问题,因为空字符串应该是大多数图形系统可以接受的值。作为一种解决方法,您是否尝试将遍历写为:

    g.addV("Test").property("title", "Test node 1").property("a", '')
    

    意思是,用单引号而不是双引号来表示空字符串?也许这是解决这个查询解析问题的一种方法。