rsql-jpa-specification icon indicating copy to clipboard operation
rsql-jpa-specification copied to clipboard

RSQLCustom Predicate with QueryDSL

Open MiguelAngelLV opened this issue 1 year ago • 7 comments

Any way to create a custom predicate using QueryDSL instead JPA?

MiguelAngelLV avatar Mar 14 '23 16:03 MiguelAngelLV

https://github.com/perplexhub/rsql-jpa-specification#querydsl-predicate-booleanexpression

perplexhub avatar Mar 16 '23 15:03 perplexhub

Sorry, I mean with custom operator

MiguelAngelLV avatar Mar 16 '23 17:03 MiguelAngelLV

Any update about this?

MiguelAngelLV avatar Mar 27 '23 11:03 MiguelAngelLV

I think it is possible. Could you try to copy the customPredicates logic in RSQLJPAPredicateConverter to RSQLQueryDslPredicateConverter? Thanks.

perplexhub avatar Mar 27 '23 16:03 perplexhub

I met the same question, could I add a custom operator like this (to support PostgreSQL hstore):

QuerySupport querySupport = QuerySupport.builder().rsqlQuery("attr @> hstore('id=>1')").build();
return userRepository.findAll(RSQLJPASupport.toSpecification(querySupport));

fghpdf avatar Dec 01 '23 15:12 fghpdf

Is there still the idea to support it in version io.github.perplexhub:rsql-querydsl-spring-boot-starter:5.1.1, to be useable in Spring 2.x. The method is RSQLQueryDslSupport.toPredicate .

MichaelKoch11 avatar Jan 11 '24 10:01 MichaelKoch11

It is possible to achieve by copying the implementatiom to 5.x branch

perplexhub avatar Jan 16 '24 19:01 perplexhub