Quarkus and Panache have Example API?

446 views Asked by At

I'm looking for a Quarkus API that works like Spring Data Example API in Panache but I wasn't able to find anything similar.

For those that do not know what the Example API is, you can think it as a query performed by an Example object, that is used as a filter to generate a query:

MyEntity example = MyEntity
    .builder()
    .param1("Hello") // param1 == "Hello"
    .param2("World") // param2 == "World"
    .build(); 
repository.findAll(Example.of(example)); // "from MyEntity e WHERE e.param1 = 'Hello' and param2 = 'World"

Of course than this can be parametrized to allow case insensitive match and so on, but you get the idea. How can be done with Panache?

1

There are 1 answers

0
loicmathieu On BEST ANSWER

There is no example API for Panache.

You can vote on this issue and provide feedback, it has been discussed but no decision taken yet: https://github.com/quarkusio/quarkus/issues/8136