Issue Details (XML | Word | Printable)

Key: JDBC-293
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

Support JDBC escapes with optional parameters

Created: 27/Dec/12 02:06 PM   Updated: 11/Mar/18 12:07 PM
Component/s: JDBC driver
Affects Version/s: None
Fix Version/s: Jaybird 4


 Description  « Hide
Some of the JDBC function escapes support optional parameters (most of which modify the behaviour of the function). The current parser does not support optional parameter.

Examples of functions are:
CHAR_LENGTH(string[,CHARACTERS|OCTETS})
CHARACTER_LENGTH(string[,CHARACTERS|OCTETS})
LENGTH(string[,CHARACTERS|OCTETS})
POSITION(substring IN string[,CHARACTERS|OCTETS])
SUBSTRING(string, start, length[, CHARACTERS|OCTETS})
LOCATE(string1, string2[, start])

In the case of CHAR_LENGTH AND CHARACTER_LENGTH the current implementation simply ignores the last parameter if specified, this is incorrect for OCTETS. In the case of LOCATE we currently only support the version that includes the optional parameter.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 03/Jan/13 01:17 PM
According to section 6.4 of JDBC 4.1, support for LOCATE(string1, string2) - so without parameter start - is required for JavaEE compliance.

Mark Rotteveel added a comment - 11/Mar/18 12:06 PM
- Have left SUBSTRING as is, optional parameter will be ignored as before
- POSITION will support optional parameter, but reject value OCTETS.