org.springframework.data.jdbc.repository.query.Query Java Examples
The following examples show how to use
org.springframework.data.jdbc.repository.query.Query.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BookRepository.java From Hands-On-Reactive-Programming-in-Spring-5 with MIT License | 5 votes |
@Query("SELECT * FROM book WHERE publishing_year = " + "(SELECT MAX(publishing_year) FROM book)") Flux<Book> findTheLatestBooks();
Example #2
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 5 votes |
@Modifying @Query("UPDATE account SET password = :password WHERE name = :name") void updatePassword(@Param("name") String name, @Param("password") String password);
Example #3
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET password = :password WHERE name = :name") void updatePassword(@Param("name") String name, @Param("password") String password);
Example #4
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET password = :password WHERE name = :name") void updatePassword(@Param("name") String name, @Param("password") String password);
Example #5
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message m WHERE m.username = :username") List<Message> messagesBy(@Param("username") String username);
Example #6
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET enabled = 1 WHERE name = :name") void activateAccount(@Param("name") String name);
Example #7
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message ORDER BY millis DESC LIMIT :n") List<Message> newestMessages(@Param("n") int n);
Example #8
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("DELETE FROM message WHERE username = :username AND millis = :millis") void deleteMessageBy(@Param("username") String username, @Param("millis") String millis);
Example #9
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET enabled = 1 WHERE name = :name") void activateAccount(@Param("name") String name);
Example #10
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET password = :password WHERE name = :name") void updatePassword(@Param("name") String name, @Param("password") String password);
Example #11
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message ORDER BY millis DESC LIMIT :n") List<Message> newestMessages(@Param("n") int n);
Example #12
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message ORDER BY millis DESC LIMIT :n") List<Message> newestMessages(@Param("n") int n);
Example #13
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("DELETE FROM message WHERE username = :username AND millis = :millis") void deleteMessageBy(@Param("username") String username, @Param("millis") String millis);
Example #14
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message m WHERE m.username = :username") List<Message> messagesBy(@Param("username") String username);
Example #15
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message ORDER BY millis DESC LIMIT :n") List<Message> newestMessages(@Param("n") int n);
Example #16
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("DELETE FROM message WHERE username = :username AND millis = :millis") void deleteMessageBy(@Param("username") String username, @Param("millis") String millis);
Example #17
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message m WHERE m.username = $1") Flux<Message> messagesBy(String username);
Example #18
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM account WHERE email = :email") Optional<Account> accountByEmail(@Param("email") String email);
Example #19
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET enabled = 1 WHERE name = :name") void activateAccount(@Param("name") String name);
Example #20
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM account WHERE email = :email") Optional<Account> accountByEmail(@Param("email") String email);
Example #21
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM account WHERE name = :name") Optional<Account> accountByUsername(@Param("name") String name);
Example #22
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message ORDER BY millis DESC LIMIT $1") Flux<Message> newestMessages(int n);
Example #23
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("DELETE FROM message WHERE username = :username AND millis = :millis") void deleteMessageBy(@Param("username") String username, @Param("millis") String millis);
Example #24
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM message m WHERE m.username = :username") List<Message> messagesBy(@Param("username") String username);
Example #25
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET password = :password WHERE name = :name") void updatePassword(@Param("name") String name, @Param("password") String password);
Example #26
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Modifying @Query("UPDATE account SET enabled = 1 WHERE name = :name") void activateAccount(@Param("name") String name);
Example #27
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM account WHERE email = :email") Optional<Account> accountByEmail(@Param("email") String email);
Example #28
Source File: AccountDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@Query("SELECT * FROM account WHERE name = :name") Optional<Account> accountByUsername(@Param("name") String name);
Example #29
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@RestResource(exported = true) @Query("SELECT * FROM message ORDER BY millis DESC LIMIT :n") List<Message> newestMessages(@Param("n") int n);
Example #30
Source File: MessageDAO.java From Spring5Tutorial with GNU Lesser General Public License v3.0 | 4 votes |
@RestResource(exported = true) @Modifying @Query("DELETE FROM message WHERE username = :username AND millis = :millis") void deleteMessageBy(@Param("username") String username, @Param("millis") String millis);