Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
I've sent a mail to the user's mailing list, but didn't get any feedback from the development team.
The mail was:
------------------------------------------------
Hello all,
I'm trying to do something like this:
Iterable<NewsContent> newsIterable = from("n").in(news).where(ne("n.title", "thisworks").and(ne("n.title", "thisworks not"))).select("n");
But it does not work since you can not have spaces in the string "thisworks not".
Any solution for this?
Another feature I miss a lot is the contains method from the String object.
This is something really important for what I'm trying to achieve.
Any idea how to do that?
I don't mind dwelling into Quaere source code, but I would appreciate if someone can point me to the right direction.
------------------------------------------------
We decided to improve this in the source code from the SVN trunk and now we can do something like:
Iterable<NewsContent> newsIterable = from("n").in(news).where(notContains("n.getTitle()", "thisworks").and(contains("n.getTitle()", "thisworks not"))).select("n");
This does not uses the contains method from String since it is case sensitive. We use a regex Pattern instead:
Pattern.compile(Pattern.quote(rightHandSide), Pattern.CASE_INSENSITIVE).matcher(leftHandSide).find();
You can found in attach a diff with the changes we have done in the source code.
Do you think it is possible to add them to the trunk?
Many Thanks,
Samuel Santos