graph-databases - 如何添加列表作为顶点或边 gremlin 的属性

标签 graph-databases gremlin amazon-neptune

1.如何添加列表作为顶点或边的属性值。 如果删除一个顶点会发生什么,它的所有现有边都会被自动删除还是我们应该手动删除,删除顶点是否安全。

2.如何使用 JSON 创建顶点以及如何以 JSON 格式获取 gremlin 查询的输出。

最佳答案

How to add a list as the value for the property for a vertex or edge.

Neptune 不支持顶点属性的列表基数,也不支持边/顶点属性的列表数据类型。但是,您可以对顶点属性使用set基数。您可以阅读更多相关信息 here .

what happens if a vertex get deleted does all its existing edges gets automatically deleted

如果删除一个顶点,则所有边都将随之删除。

How to create a vertex with JSON and how to get the output of gremlin query as JSON format.

我不确定你的意思。您通常不会真正使用 JSON 创建顶点。您使用 Gremlin,这意味着您选择连接到 Neptune 的方法(例如 Java 驱动程序、Python 驱动程序等),然后将 Gremlin 发送到 Neptune。要创建顶点,您可以执行以下操作:g.addV('person').property('name','mmr')

关于graph-databases - 如何添加列表作为顶点或边 gremlin 的属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52737958/

相关文章:

java - 在java代码中向密码查询插入字符串参数时出错

mysql - 将图中的路径编码为字符串?

.net - 如何使用 Gremlin Cosmos DB 过滤相关对象?

javascript - 在 gremlin 中,如何查找和排序给定顶点所属的所有连通顶点三元组?

graph-databases - Gremlin:按查询从 group 返回 valueMap/projected 属性

python - Bulbflow – 如何将列表/字典保存为属性

neo4j - Gremlin 查询类似于 SQL IN 运算符?

cassandra - JanusGraph 错误 : "Could not find type for id" during a concurrent load operation

gremlin - 在 AWS Neptune Gremlin Python 中正确处理顶点删除

java - 从 EC2 窗口访问 Amazon Neptune