junction front - back
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package ovh.herisson.Clyde.Repositories.ScientificPublications;
|
||||
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import ovh.herisson.Clyde.Tables.ScientificPublications.Research;
|
||||
import ovh.herisson.Clyde.Tables.ScientificPublications.Researcher;
|
||||
import ovh.herisson.Clyde.Tables.User;
|
||||
|
||||
@ -8,4 +10,7 @@ public interface ResearcherRepository extends CrudRepository<Researcher,Long> {
|
||||
Researcher findByUser(User user);
|
||||
|
||||
Researcher findById(long id);
|
||||
|
||||
@Query("select r from Research r where r.author = ?1")
|
||||
Iterable<Research> findAllByAuthorId(Researcher author);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ public interface StatsRepository extends CrudRepository<Research,Long> {
|
||||
@Query("select new map(to_char(r.releaseDate, 'month') as label, sum(r.views) as y) from Research r group by to_char(r.releaseDate, 'month')")
|
||||
Iterable<Map<String ,Integer>> viewsByMonths();
|
||||
|
||||
|
||||
/**
|
||||
Iterable<Map<String ,Integer>> viewsByYears();
|
||||
Iterable<Map<String ,Integer>> viewsByTopics();
|
||||
Iterable<Map<String ,Integer>> coAuthorByMonths();
|
||||
@ -22,6 +22,6 @@ public interface StatsRepository extends CrudRepository<Research,Long> {
|
||||
Iterable<Map<String ,Integer>> researchesByYears();
|
||||
Iterable<Map<String ,Integer>> researchesByTopics();
|
||||
Iterable<Map<String ,Integer>> researchesByMonth();
|
||||
|
||||
**/
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user