org.janusgraph.core.JanusGraph.query()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.janusgraph.core.JanusGraph.query()方法的一些代码示例,展示了JanusGraph.query()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JanusGraph.query()方法的具体详情如下:
包路径:org.janusgraph.core.JanusGraph
类名称:JanusGraph
方法名:query

JanusGraph.query介绍

暂无

代码示例

代码示例来源:origin: JanusGraph/janusgraph

public static void assertGraphOfTheGods(JanusGraph graphOfTheGods) {
  assertCount(12, graphOfTheGods.query().vertices());
  assertCount(3, graphOfTheGods.query().has(LABEL_NAME, "god").vertices());
  final JanusGraphVertex h = getOnlyVertex(graphOfTheGods.query().has("name", "hercules"));
  assertEquals(30, h.<Integer>value("age").intValue());
  assertEquals("demigod", h.label());
  assertCount(5, h.query().direction(Direction.BOTH).edges());
  graphOfTheGods.tx().commit();
}

代码示例来源:origin: apache/atlas

public NativeJanusGraphQuery(AtlasJanusGraph graph) {
  this.query = AtlasJanusGraphDatabase.getGraphInstance().query();
  this.graph = graph;
}

相关文章