Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ILIKE #321

Closed
raimohanska opened this issue Dec 8, 2016 · 11 comments
Closed

Support for ILIKE #321

raimohanska opened this issue Dec 8, 2016 · 11 comments

Comments

@raimohanska
Copy link

Would be nice to have ILIKE in addition to regular LIKE, for case-insensitive like-queries.

@tminglei
Copy link
Owner

@raimohanska just did some refactoring and released v0.14.4 and v0.15.0-M3, will continue to implement this.

tminglei added a commit that referenced this issue Dec 12, 2016
@tminglei
Copy link
Owner

tminglei commented Dec 13, 2016

@raimohanska implemented, can you help check?
Thanks!

@raimohanska
Copy link
Author

I tried but unfortunately I'm unable to get this revision using jitpack-io to my Maven project that uses Scala 2.11...

@tminglei
Copy link
Owner

It's not released yet. You need build it on your local.

@raimohanska
Copy link
Author

I upgraded to scala 2.12 and can currently almost compile my project. The only remaining issue is:

While trying to update to the newest version, I run into an issue with bind.any: previously I was able to do val things: List[JValue] = ... ; things.bind.any and use this in a query. Now I get "value bind is not a member of List[org.json4s.JValue]". Any idea what could have happened?

Having fixed this, I could move to working on ILIKE...

@raimohanska
Copy link
Author

raimohanska commented Dec 23, 2016

To be more exact, with v0.15.0-M3 (or later), these three compile:

    List("asdf").bind.any
    List(1).bind.any
    parse(s"""[]""").bind

While these two don't

    List(parse(s"""[]""")).bind
    List(parse(s"""[]""")).bind.any

The error message is value bind is not a member of List[org.json4s.JValue]

@tminglei
Copy link
Owner

tminglei commented Dec 23, 2016

Here's the changes that I made to support scala v2.12, maybe you can check and adjust if necessary.


In summary, we need 1) explicitly declare the type when overriding; 2) declare a trait then implement its companion object by object xxx extends xxx, when existing overrides.

@raimohanska
Copy link
Author

Thanks a ton! My project finally compiles. The best xmax present I got this year :)

@raimohanska
Copy link
Author

Pls add a Donate button on your project page, I owe you a beer.

@raimohanska
Copy link
Author

I now use ilike in my project and it works like a charm!

@tminglei
Copy link
Owner

Glad to hear that! You're welcome! ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants