Skip to content

Commit

Permalink
Update RoyaltyRepository.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AnghelLeonard authored May 2, 2019
1 parent 8eb51b5 commit fe29e22
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface RoyaltyRepository extends JpaRepository<Royalty, Long> {

@Transactional(readOnly = true)
@Query(value = "select concat_ws(r.name, ?1, r.amount, ?2) from Royalty r WHERE r.id = 1")
String fetchNameAndAmount(String symbol, Instant instant);
}

0 comments on commit fe29e22

Please sign in to comment.