Java Code Examples for org.springframework.data.r2dbc.repository.Query

The following examples show how to use org.springframework.data.r2dbc.repository.Query. These examples are extracted from open source projects. 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
@Query("select * from service_instance_binding " +
		"where service_instance_id = :service_instance_id " +
		"and binding_id = :binding_id")
Mono<ServiceInstanceBinding> findByServiceInstanceIdAndBindingId(
		@Param("service_instance_id") String serviceInstanceId,
		@Param("binding_id") String bindingId);
 
Example 2
@Query("delete from service_instance_binding " +
		"where service_instance_id = :service_instance_id " +
		"and binding_id = :binding_id")
Mono<Void> deleteByServiceInstanceIdAndBindingId(
		@Param("service_instance_id") String serviceInstanceId,
		@Param("binding_id") String bindingId);
 
Example 3
@Query("select * from service_instance where service_instance_id = :service_instance_id")
Mono<ServiceInstance> findByServiceInstanceId(@Param("service_instance_id") String serviceInstanceId);
 
Example 4
@Query("delete from service_instance where service_instance_id = :service_instance_id")
Mono<Void> deleteByServiceInstanceId(@Param("service_instance_id") String serviceInstanceId);
 
Example 5
@Query("SELECT * FROM posts WHERE title like @name")
Flux<Post> findByTitleContains(String name);
 
Example 6
@Query("SELECT * FROM posts WHERE title like $1")
Flux<Post> findByTitleContains(String name);
 
Example 7
@Query("SELECT * FROM posts WHERE title like $1")
Flux<Post> findByTitleContains(String name);
 
Example 8
@Query("SELECT * FROM posts WHERE title like $1")
Flux<Post> findByTitleContains(String name);
 
Example 9
@Query("SELECT * FROM posts WHERE title like $1")
Flux<Post> findByTitleContains(String name);
 
Example 10
@Query("SELECT * FROM posts WHERE title like $1")
Flux<Post> findByTitleContains(String name);
 
Example 11
Source Project: spring-data-dev-tools   Source File: R2dbcBookRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query(BY_TITLE)
Mono<Book> findByTitle(String title);
 
Example 12
Source Project: spring-data-dev-tools   Source File: R2dbcBookRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Transactional(readOnly = true)
@Query(BY_TITLE)
Mono<Book> findTransactionalByTitle(String title);
 
Example 13
Source Project: POC   Source File: PostRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("select id, title, content from reactive_posts p where p.content = :content")
Flux<ReactivePost> findByContent(String content);
 
Example 14
Source Project: spring-data-examples   Source File: CustomerRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("select id, firstname, lastname from customer c where c.lastname = :lastname")
Flux<Customer> findByLastname(String lastname);
 
Example 15
Source Project: tutorials   Source File: PlayerRepository.java    License: MIT License 4 votes vote down vote up
@Query("select id, name, age from player where name = $1")
Flux<Player> findAllByName(String name);
 
Example 16
Source Project: tutorials   Source File: PlayerRepository.java    License: MIT License 4 votes vote down vote up
@Query("select * from player where age = $1")
Flux<Player> findByAge(int age);
 
Example 17
Source Project: spring-data-examples   Source File: BookRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("SELECT * FROM BOOK WHERE TITLE LIKE CONCAT('%', :title, '%')"
    + " ORDER BY PUBLICATION_DATE"
    + " OFFSET :start"
    + " FETCH NEXT :rowCount ROWS ONLY")
Flux<Book> findByTitleContains(String title, int start, int rowCount, Sort sort);
 
Example 18
Source Project: spring-data-examples   Source File: BookRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("SELECT COUNT(*) FROM BOOK WHERE TITLE LIKE CONCAT('%', :title, '%')")
Mono<Integer> countByTitleContains(String title);
 
Example 19
Source Project: spring-data-examples   Source File: CategoryRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("SELECT c.* FROM CATEGORY c"
    + " JOIN BOOK_CATEGORY bc ON c.ID = bc.CATEGORY"
    + " WHERE bc.BOOK = :bookId"
    + " ORDER BY bc.ID")
Flux<Category> findByBook(long bookId);
 
Example 20
Source Project: spring-data-examples   Source File: AuthorRepository.java    License: Apache License 2.0 4 votes vote down vote up
@Query("SELECT a.* FROM AUTHOR a"
    + " JOIN BOOK_AUTHOR ba ON a.ID = ba.AUTHOR"
    + " WHERE ba.BOOK = :bookId"
    + " ORDER BY ba.ID")
Flux<Author> findByBook(long bookId);