Commit 1559d4c1 by qiuchaofei

1 修改按照id查找的返回类型,2 添加sql,字段的同步

parent 0f43e75f
...@@ -112,7 +112,15 @@ public class RelationalGraphController { ...@@ -112,7 +112,15 @@ public class RelationalGraphController {
return metadataService.getMetaDataByMetadataId(metadataId); return metadataService.getMetaDataByMetadataId(metadataId);
} }
//展开当前节点
@ApiOperation(tags = "", value = "传入一个节点的元数据id,返回当前节点的关系")
@RequestMapping(path = "/expandNode", method = RequestMethod.GET)
public ReturnReslult expandNode(String dataId,String size) {
logger.info("传入的元模型名称是:"+dataId);
ReturnReslult returnReslult = new ReturnReslult();
return returnReslult;
}
//表的分析,链路分析,表与其他表的上下游关系,其他表可以继续下钻,并且可以收缩。 //表的分析,链路分析,表与其他表的上下游关系,其他表可以继续下钻,并且可以收缩。
......
...@@ -11,8 +11,25 @@ import java.util.List; ...@@ -11,8 +11,25 @@ import java.util.List;
@Repository @Repository
public interface Neo4jSchemaRepository extends Neo4jRepository<Neo4jSchema, Long> { public interface Neo4jSchemaRepository extends Neo4jRepository<Neo4jSchema, Long> {
Neo4jSchema findNeo4jSchemaByMetadataId(String metadataId); Neo4jSchema findNeo4jSchemaByMetadataId(String metadataId);
@Query("match (n:Neo4jSchema{metadataId:{schemaId}} )-[r:Composition]->(m) return m ") @Query("match (n:Neo4jSchema{metadataId:{schemaId}} )-[r:Composition]->(m) return m order by m.name ")
List<BaseNode> getChildrenBySchemaId(@Param("schemaId") String schemaId);
@Query("match (n:Neo4jSchema{metadataId:{schemaId}} )-[r:Composition]->(m:neo4jTable) return m order by m.name ")
List<BaseNode> getTableBySchemaId(@Param("schemaId") String schemaId); List<BaseNode> getTableBySchemaId(@Param("schemaId") String schemaId);
@Query("match (n:Neo4jSchema{metadataId:{schemaId}} )-[r:Composition]->(m:neo4jView) return m order by m.name ")
List<BaseNode> getViewBySchemaId(@Param("schemaId") String schemaId);
@Query("match (n:Neo4jSchema{metadataId:{schemaId}} )-[r:Composition]->(m:neo4jFunction) return m order by m.name ")
List<BaseNode> getFunctionBySchemaId(@Param("schemaId") String schemaId);
@Query("match (n:Neo4jSchema{metadataId:{schemaId}} )-[r:Composition]->(m:neo4jProcedure) return m order by m.name ")
List<BaseNode> getProcedureBySchemaId(@Param("schemaId") String schemaId);
} }
...@@ -10,5 +10,5 @@ import java.util.List; ...@@ -10,5 +10,5 @@ import java.util.List;
@Repository @Repository
public interface Neo4jViewRepository extends Neo4jRepository<Neo4jView,Long> { public interface Neo4jViewRepository extends Neo4jRepository<Neo4jView,Long> {
List<Neo4jView> findNeo4jViewByMetadataId(String metadataId); Neo4jView findNeo4jViewByMetadataId(String metadataId);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment