简体   繁体   English

使用 TinkerPop Gremlin 和 Java 从 GraphTraversal 操作中获取结果

[英]Get result from GraphTraversal operations with TinkerPop Gremlin and Java

Using TinkerPop Gremlin with Neptune DB, is there a way to get a "result" from a mutation?将 TinkerPop Gremlin 与 Neptune DB 一起使用,有没有办法从突变中获得“结果”? The iterate() returns GraphTraversal<S, E> , but is there a way to determine success/fail? iterate()返回GraphTraversal<S, E> ,但是有没有办法确定成功/失败? Or do we just assume success if there was no exception thrown?或者如果没有抛出异常我们就假设成功了吗?

The iterate step has an implicit call to none , which returns no results. iterate步骤有一个对none的隐式调用,它不返回任何结果。

If the mutation query has results, perhaps try using toList instead.如果变异查询有结果,也许可以尝试使用toList代替。 All queries are ACID transactions, so they will either complete (and commit) or fail and throw an exception.所有查询都是 ACID 事务,因此它们要么完成(并提交)要么失败并抛出异常。 So if no exception is thrown, you can assume success, but if you want to see some results, terminating the query with toList is probably the best way.因此,如果没有抛出异常,您可以假设成功,但如果您想看到一些结果,使用toList终止查询可能是最好的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.io.InvalidClassException:org.apache.tinkerpop.gremlin.hadoop.structure.HadoopConfiguration; 无法创建实例 - java.io.InvalidClassException: org.apache.tinkerpop.gremlin.hadoop.structure.HadoopConfiguration; unable to create instance 如何在 apache tinkerpop gremlin 或图形数据库中实现查找/引用数据? - How to implement lookup/reference data in apache tinkerpop gremlin or graph database? firebase笔交易的get操作如何即时返回结果 - How do get operations on firebase transactions instantly return the result 在 hasId 中使用 select 的 Gremlin 返回不正确的结果 - Gremlin using select in hasId returns incorrect result 如何在 Terraform output 中获取 cosmos db gremlin 端点 - How to get cosmos db gremlin endpoint in Terraform output 无法从 firebase 获取结果并显示在警告对话框中 - Cannot get the result from firebase and show in alert dialog 你如何从 golearn 模型中得到结果? - How do you get the result from golearn models? 从“aws ecr get-login”获取结果时出现问题 - Problem in getting result from 'aws ecr get-login' Gremlin:AWS Neptune - 获取图中每个节点的所有叶节点作为 CSV - Gremlin : AWS Neptune - Get all Leaf Nodes for each Node in the Graph as CSV AWS SDK2 java s3 select 示例 - 如何获取结果字节 - AWS SDK2 java s3 select example - how to get result bytes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM