gremlin - AWS Neptune - 提交带有空字符串的查询崩溃
问题描述
" "
带有(empty space with space) 的脚本可以正常工作,但""
空字符串会崩溃。
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 问题。这是海王星的错误或功能吗?
解决方案
我猜想 Neptune 作为空字符串的问题对于大多数图形系统来说应该是一个可接受的值。作为一种解决方法,您是否尝试将遍历编写为:
g.addV("Test").property("title", "Test node 1").property("a", '')
意思是,使用单引号来表示空字符串而不是双引号?也许这是此查询解析问题的解决方法。
推荐阅读
- awkward-array - 在笨拙数组备份的子集上传播选择
- c - Scheme 到 C 的翻译器
- mockito - 使用给定参数返回带有 Mockito 的模拟对象
- axapta - 在声明中更改allowedit
- typescript - 在 TypeScript 中使用数据库的 Firebase 管理员
- javascript - @babel/preset-env 没有从 package.config 中读取 browserslist
- php - SyntaxError:JSON.parse:在 json 输出中使用 URL 时需要
- swift - 使用 RxSwift 的反应式异步反馈系统
- javascript - 以不同的顺序在断点处重新组织网格 - html css 和 js
- ios - 颤振错误:FIROAuthProvider credentialWithProviderID:provider