Code Monkey home page Code Monkey logo

Comments (4)

marcopag90 avatar marcopag90 commented on May 27, 2024 1

Ok, seems good to me as well!

from springfilter.

torshid avatar torshid commented on May 27, 2024

Not sure how to provide this feature.

As an operator (which symbol?), as a function? We can maybe put a flag in the config class and let the user decide the general behavior?

We may also not interfer at all, and directly call JPA's like function without applying uppercase as it is now. The user may then use a query as follows for case insensitive searches but it adds some complexity: uppercase(name) ~ '%DOE%'

from springfilter.

marcopag90 avatar marcopag90 commented on May 27, 2024

Mmh, general behaviour could not be the case, there are scenario where I'd rather prefer to perform a query as if i'm considering a function.
Maybe the uppercase function is the right way, so without interfering at all in JPA.
What about adding another token operator (if the grammar allows it) such as ~i '%DOE%'? This could means insensitive, while default ~ is just as if the query was seen from a database perspective?

from springfilter.

torshid avatar torshid commented on May 27, 2024

Not interfering with JPA looks like the best option.
Adding another operator means that it should also be implemented in MongoDB (and maybe other things to come) and it may not make sense in some cases. On top of that it opens too many doors which can easily complexify the current query syntax.

What I'll do is:

  • Keep the current case insensitive behavior
  • Add a config flag to disable this default behavior
  • Add the uppercase function and some others

The query example I gave earlier could then be used to make a case insensitive search in case the default behavior is disabled.

from springfilter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.