[英]How to start a new connection with CosmoDB graph database using gremlin on version ^3
[英]Cayley: How do insert vertices and edges into graph using Cayley-Gremlin code?
因此,对于Go和Cayley来说,我是新手,我正努力将数据插入到图形中。 我正在使用以下命令在命令行上运行gremlin控制台:
cayley repl --db="bolt" --dbpath=../../database/database1 --query_lang="gremlin"
我知道Cayley使用Gremlin的其他变体。 此页面( https://github.com/google/cayley/wiki )指出它使用的是“ Cayley-Gremlin”而不是“ Tinkerpop-Gremlin”。 我认为在大多数情况下,API都将保持不变,但事实并非如此。 该文档指出该图形对象具有可用的addVertex
方法。 但是,当我尝试在Cayley repl中使用该方法时,出现错误:
cayley> g.addVertex("test")
Error: TypeError: 'addVertex' is not a function
-----------
1 Results
Elapsed time: 0.102239 ms
为什么该方法在图形上不可用? API是否不同? 还有另一种使用“ Cayley-Gremlin”将节点/边插入图形的方法吗?
提前致谢!
Cayley中的gremlin仅用于遍历。 https://github.com/google/cayley/blob/master/docs/GremlinAPI.md是用于cayley的完整gremlin API。
使用http添加数据: https : //github.com/google/cayley/blob/master/docs/HTTP.md#apiv1write
我是Cayley的新手,但我认为
cayley> :a subject predicate object label .
是gremlin的命令,用于添加从repl执行的新顶点(对我来说,这是添加和删除( :d
)的更方便的方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.