Opened 14 years ago

Closed 14 years ago

#1504 closed enhancement (fixed)

Add support for LIKE expressions to JEP parser

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: BASE 2.16
Component: web Version:
Keywords: Cc:


It would for example be useful to create filters like: rep('symbol') == 'BRCA%'.

But since the parsing of operators in JEP is rather fixed we probably have to define a custom function: like(rep('symbol'), 'BRCA%')

Change History (2)

comment:1 by Nicklas Nordborg, 14 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

I think it would be possible to detect if a '%' is present in the right-hand argument in the filter string and then use LIKE in the SQL expression instead of ==. It will break existing expressions that search for an explicit '%' but they could be re-written as: 'BRCA%' == rep('symbol')

comment:2 by Nicklas Nordborg, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [5401]) Fixes #1504: Add support for LIKE expressions to JEP parser

The parse will detect situations were the right hand argument of expressions like foo == 'bar%' is a string constant that includes a '%'. If so, the parser will create a LIKE-restriction instead of an EQUALS-restriction.

Note: See TracTickets for help on using tickets.