[ 
https://issues.apache.org/jira/browse/OPENJPA-976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710722#action_12710722
 ] 

Milosz Tylenda commented on OPENJPA-976:
----------------------------------------

Mike, I think we got a bit off-topic in this issue. I suggest that the outcome 
of this issue be a list of databases which gives answers to:

- does the database require ESCAPE [char] clause in LIKE?
- if the databse does not require the ESCAPE clause: does it assume some 
default escaping char or does not it do any escaping at all?
- does the database poses any constraints on the escaping chracters? E.g. a 
back-slash must be prefixed with another back-slash.

If we got the list, we modify the code (possibly in a new JIRA issue) for the 
case when a JPQL string does not specify ESCAPE char:
- we don't generate ESCAPE clause for databases that don't require it
- possibly we could think of what to do if a database happens to assume some 
default escaping char (maybe there is no such database)

We might also need to think of the case when a JPQL string specifies ESCAPE 
char but the database poses a constraint, e.g. the double back-slash (another 
JIRA issue).

This is how I understand the problem raised here and in OPENJPA-975. Maybe it 
is too much and for the beginning we want to do only a subset of the changes.

As for the list of databases, I can say PostgreSQL does not require ESCAPE so 
it looks like Oracle is not alone in their camp.

> Research the need for escape charaters for LIKE in various DB's
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-976
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-976
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jdbc
>            Reporter: B.J. Reed
>            Assignee: B.J. Reed
>            Priority: Minor
>         Attachments: OPENJPA-976.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> A new requiresSearchStringEscapeForLike field was added to the DBDictionary 
> in http://issues.apache.org/jira/browse/OPENJPA-975.  Currently, the default 
> is true and the OracleDictionary overwrites it to false.  Need to investigate 
> other DB's to see what other dictionaries would be better off as false..

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to