Issue Details (XML | Word | Printable)

Key: CMIS-180
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Ethan Gur-esh
Reporter: Ryan McVeigh
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OASIS Content Management Interoperability Services (CMIS) TC

Clarify query escape behavior.

Created: 08/May/09 03:49 PM   Updated: 11/Jan/10 07:30 PM
Component/s: Domain Model
Affects Version/s: Draft 0.61
Fix Version/s: Draft 0.62

Proposal: use backslash


 Description  « Hide
SQL92's LIKE predicate also has an optional ESCAPE argument. So, in regards to CMIS SQL, what are the like string escaping rules? As there is no way to specify an escape character in the grammar, is it simply not allowed (as in SQL92 without the ESCAPE clause)? Or is there some default escape character? What does it escape (i.e. just % and _, or does it escape quotes (which will modify the entire BNF, I think)?

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Florent Guillaume added a comment - 08/May/09 09:18 PM
Yes escaping is quite important, to be able to pass arbitrary user-generated strings to a query backend.
I would therefore propose to use the complete SQL92 rules:

         <like predicate> ::= <match value> [ NOT ] LIKE <pattern> [ ESCAPE <escape character> ]
         <match value> ::= <character value expression>
         <pattern> ::= <character value expression>
         <escape character> ::= <character value expression>

with <escape character> of length 1 and the <pattern> following the SQL92 rules for its well-formedness.

Al Brown added a comment - 04/Jun/09 06:48 PM
We should clarify how escaping works

Al Brown added a comment - 08/Jun/09 01:22 PM
deferred to query wg

Al Brown added a comment - 10/Jun/09 11:47 AM
Oracle to propose default escape character

Ryan McVeigh added a comment - 10/Jun/09 03:54 PM
Proposal: Use backslash as the default escape character.

Florent Guillaume added a comment - 11/Jun/09 06:40 AM
So a backslash would be needed in the pattern in front of any literal:
 % _ ' \
right?

Al Brown added a comment - 15/Jun/09 01:28 PM
accepted; florent - yes

Al Brown added a comment - 19/Jun/09 06:02 PM
in 62b

Al Brown added a comment - 04/Jan/10 11:44 PM
JIRA Cleanup