Issue Details (XML | Word | Printable)

Key: NUCRDBMS-410
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Support JDOQL StringExpression.indexOf(str, pos) with Postgresql

Created: 09/Jun/10 09:46 AM   Updated: 11/Jun/10 01:38 PM   Resolved: 09/Jun/10 10:23 AM
Component/s: Queries
Affects Version/s: None
Fix Version/s: 2.1.0.release


 Description  « Hide
While PostgreSQL doesn't have a single function that will achieve it, what you could do is

CASE WHEN (STRPOS(SUBSTR(STR_FIELD, START_POS)) > 0)
    THEN (STRPOS(SUBSTR(STR_FIELD, START_POS), STR) -1 + START_POS)
ELSE
    -1

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 09/Jun/10 10:23 AM
SVN trunk implements this now, and the JDOQLBasicTest passes