如何检查是否已在 JanusGraph 中创建架构?
How to check if schema already created in JanusGraph?
试图检查是否安装了 JanusGraph 中的模式,所以我检查了 JanusGraph 文档“模式和数据建模”,如我所见可以打印模式,但我不知道是否有标记为“schema installed”或“modified”。那么如何检查 JanusGraph 中的架构是否已安装?
从“mgmt”对象我们可以检查“getRelationTypes”,如果它存在则模式存在
mgmt.getRelationTypes(RelationType.class).iterator().hasNext()
试图检查是否安装了 JanusGraph 中的模式,所以我检查了 JanusGraph 文档“模式和数据建模”,如我所见可以打印模式,但我不知道是否有标记为“schema installed”或“modified”。那么如何检查 JanusGraph 中的架构是否已安装?
从“mgmt”对象我们可以检查“getRelationTypes”,如果它存在则模式存在
mgmt.getRelationTypes(RelationType.class).iterator().hasNext()