Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JDBC escapes with optional parameters [JDBC293] #339

Closed
firebird-automations opened this issue Dec 27, 2012 · 5 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

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.

Commits: ccd5fc3

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

According to section 6.4 of JDBC 4.1, support for LOCATE(string1, string2) - so without parameter start - is required for JavaEE compliance.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 4 [ 10441 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

- Have left SUBSTRING as is, optional parameter will be ignored as before
- POSITION will support optional parameter, but reject value OCTETS.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants