IN Clause Patch

11 views
Skip to first unread message

mavanier

unread,
Feb 14, 2012, 2:44:38 PM2/14/12
to SimpleJPA
Hi Devs,

The dev team in the company I worked for, changed the QueryImpl class
in order to support the IN queries. I would like to know if this patch
can be approved by the commiters.

In this class I saw the following comment

/**
* Need to support the following: <p/> <p/> - Navigation operator (.)
DONE - Arithmetic operators: +, - unary *, / multiplication and
division +, - addition and subtraction -
* Comparison operators : =, >, >=, <, <=, <> (not equal), [NOT]
BETWEEN, [NOT] LIKE, [NOT] IN, IS [NOT] NULL, IS [NOT] EMPTY, [NOT]
MEMBER [OF] - Logical operators: NOT AND OR
* <p/> see: http://docs.solarmetric.com/full/html/ejb3_langref.html#ejb3_langref_where
<p/> User: treeder Date: Feb 8, 2008 Time: 7:33:20 PM
*/

QueryImpl.java:
Replace the line:
public static String conditionRegex = "(<>)|(>=)|(<=)|=|>|<|\\band\\b|\
\bor\\b|\\bis\\b|\\blike\\b";
by
public static String conditionRegex = "(<>)|(>=)|(<=)|=|>|<|\\band\\b|\
\bor\\b|\\bis\\b|\\blike\\b|\\bin\\b";

Will this do the trick? Or there is something else to do?

Regards,
M-A Vanier

Travis Reeder

unread,
Feb 15, 2012, 5:20:45 PM2/15/12
to simp...@googlegroups.com
Hi,

Please submit a pull request on github and we'll take a look at it: https://github.com/appoxy/simplejpa

Travis


--
You received this message because you are subscribed to the Google Groups "SimpleJPA" group.
To post to this group, send email to simp...@googlegroups.com.
To unsubscribe from this group, send email to simplejpa+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simplejpa?hl=en.


Reply all
Reply to author
Forward
0 new messages