Comments (4)
Thanks for your contribution. :)
The origin of the %
character is actually JPA itself, that's the character it uses for the like function. As you can see here I simply call the builder's like method without transforming the inputs (besides uppercasing):
return criteriaBuilder.like(criteriaBuilder.upper((Expression) leftExpression),
criteriaBuilder.upper((Expression<String>) rightExpression));
The %
character should not be a problem if it is properly encoded to %25
when calling the API, since Spring decodes it back naturally. For example, it works fine with Spring's RestTemplate, Postman (encodes by default), or Swagger UI.
However I would like to have more info on your use case, which client are you using?
Since it seems to be a standart to use the asterisk, I just released a new version (0.9.5) with support for it.
That's out off topic but how did you find the repo? :)
I have also written a post on Medium some time ago, would really appreciate if you can share it.
from springfilter.
Mhh that's strange, maybe i need to dig around some options with the client, as i was using Postman and i had to manually encode with %25 in the url to make it work, that's why i opened the issue.
Yea you are right, i know it's a JPA built-in feature (well, JPA itself just converts the parameter to a sql query in the criteria).
I think different libraries use the asterisk to avoid url enconding problems from the beginning.
I wanted something that could use JPA Repositories and entity graphs, to avoid hibernate n+1 queries when joining data and handle LAZY objects, and your library works like a charm :).
Anyways...I'm definitely sharing it dudeπ .
I found your repo from this post jirutka/rsql-parser#29, as i was looking for a library for a microservice ecosystem built on top of Spring Framework, with the ability to work with nested objects and complex query critera.
from springfilter.
Thanks again. :)
Feel free to open issues/ask for new features.
from springfilter.
By the way you are right, I just remembered that Postman does not encode by default as I had the same issue, this option can be turned on though.
from springfilter.
Related Issues (20)
- [MongoDB] $in with ObjectId HOT 2
- Global case insensitive search HOT 1
- Opportunity to use functions on the right side of the comparators HOT 1
- Discord Server HOT 2
- Unable to filter on List of Strings HOT 2
- Add new module for deserialization in the @Filter annotation HOT 4
- Implement `NotLike` value comparator. HOT 1
- Mongo filter collections HOT 3
- Showcase - how do you use Spring Filter? HOT 1
- Customizing the escape character for like operations (`~` and `~~`) HOT 3
- Filter by Map in Mongo HOT 1
- Mongo filtering nested fields not working in 3.x.x version HOT 2
- Case insensitive equals search
- Possible to filter without Spring boot controller? HOT 1
- MongoDB - query by DBRef HOT 2
- Make field not searchable HOT 1
- Any extended support for Quarkus? HOT 2
- Support for projection HOT 1
- Query in relations HOT 1
- How to set require false in swagger? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from springfilter.