spring-projects / spring-data-r2dbc

Provide support to increase developer productivity in Java when using Reactive Relational Database Connectivity. Uses familiar Spring concepts such as a DatabaseClient for core API usage and lightweight repository style data access.
Apache License 2.0
708 stars 132 forks source link

`IS NOT` `StringMatcher` using Query by Example #815

Closed pigping88 closed 1 year ago

pigping88 commented 1 year ago

How to findby neq by using r2dbcRepository ?

r2dbcRepository.findBy(Example.of(T, ExampleMatcher), queryFuction -> {})

mp911de commented 1 year ago

StringMatcher does not provide a constant for not equals, it supports only exact/ starting/ending/containing modes.

pigping88 commented 1 year ago

And , i need the conditional querying with R2dbcRepository. such as: @Query("select * from table t where if conditionA ? t.x = xx : t.y = xx")

mp911de commented 1 year ago

Query by Example is not intended for IS NOT EQUAL TO queries (!=), but rather to match an example.