我想在SQL中使用这种语法:
create class Person extends V
在Gremlin
我不确定是否可以通过Gremlin操作OrientDB模式。Gremlin独立于OrientDB,并且不适用于架构,因为并非所有图形数据库都支持架构。
要在OrientDB中添加特定类的顶点,可以使用Graph API(请参阅doc)。如果class:
在类名之前添加字符串,则将创建该类的顶点。
graph.addVertex("class:User");
此代码段将创建class的顶点User
。希望对您有帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句