Closed phamdong2812 closed 5 years ago
filter = "company.code==^EM"; //ignore case equal ilter = "company.code==dem"; //like dem% filter = "company.code==emo"; //like %emo filter = "company.code==em"; //like %em% filter = "company.code==^EM"; //ignore case like %EM% filter = "company.code=='^EM'"; //ignore case like %EM%
Thanks for the reply!. But: Input some special characters such as (^ , ). rsql-jpa search records which don't contain inputed special characters. Expected Result: only find record containing special character (^ , ).
builder.like(builder.upper(attrPath), argument.toString().replace("*", "%").replace("^", "").toUpperCase());
You can try below workaround. filter = "company.code=in=()"; //equal to filter = "company.code=in=(^)"; //equal to ^
Thanks! I used as you in the case of equal comparison. But the case of like (^ ,* ), really have not found a solution.
Let me add some new operators to support your cases
Thanks
e.g. =like= =ilike= =icase=
Stay tuned
Thanks! When is the update for this case?
Please use version 4.0.8
Thanks. if (op.equals(IGNORE_CASE_LIKE)) { return builder.equal(builder.upper(attrPath), "%" + argument.toString().toUpperCase() + "%"); }
builder.equal ==> builder.like ??
version 4.0.9, thanks!
Upgrade version 2.01==>4.09 exception [io/github/perplexhub/rsql/RSQLConfig.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [io.github.perplexhub.rsql.RSQLSupport] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]. java.lang.NoClassDefFoundError: com/querydsl/core/types/Path
Must add plugin ==> Is there any other solution?
you need to add your own querydsl dependency in your pom if you use querydsl
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-core</artifactId>
<version>${querydsl-core.version}</version>
</dependency>
Does rsql-jpa-specification have any special way to support case insensitive like queries? like 'a^' or like 'a*'?
Thanks