|
@@ -24,7 +24,7 @@ public interface RelationRepository extends Neo4jRepository<Neo4jRelation, Long>
|
|
|
List<Neo4jRelation> getRelationByNameLength4(@Param("firstName") String firstName, @Param("secondName") String secondName);
|
|
|
@Query("match data=(e1:Entity{name: $firstName})-[*..5]-(e2:Entity{name: $secondName}) return data")
|
|
|
List<Neo4jRelation> getRelationByNameLength5(@Param("firstName") String firstName, @Param("secondName") String secondName);
|
|
|
- @Query("match data=(e1:Entity{name: $firstName})-[*..5]-(e2:Entity{name: $secondName}) where ALL( n1 in nodes(data) where size([n2 in nodes(data) where id(n1) = id(n2)])=1 ) return data")
|
|
|
+ @Query("match data=(e1:Entity{name: $firstName})-[*]-(e2:Entity{name: $secondName}) where ALL( n1 in nodes(data) where size([n2 in nodes(data) where id(n1) = id(n2)])=1 ) return data")
|
|
|
List<Neo4jRelation> getAllRelationByName(@Param("firstName") String firstName, @Param("secondName") String secondName);
|
|
|
|
|
|
@Query("match data=allshortestpaths((e1:Entity{name: $firstName})-[*]-(e2:Entity{name: $secondName})) return data")
|
|
@@ -38,4 +38,7 @@ public interface RelationRepository extends Neo4jRepository<Neo4jRelation, Long>
|
|
|
|
|
|
@Query(value = "match data=(e1:Entity)-[r:Relation{name:$0.name}]->(e2:Entity) return data", countQuery = "match data=(e1:Entity)-[r:Relation{name:$0.name}]->(e2:Entity) return count(data)")
|
|
|
Page<Neo4jRelation> getPageListByName(RelationDTO dto, PageRequest page);
|
|
|
+
|
|
|
+ @Query("match data=(e1:Entity)-[r:Relation]-(e2:Entity) where e1.name =~ $name and e2.name =~ $name return data")
|
|
|
+ List<Neo4jRelation> getRelationByLikeName(@Param("name") String name);
|
|
|
}
|