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

Revise and extend Escape syntax support for JDBC 4.1 [JDBC223] #272

Closed
firebird-issue-importer opened this issue Jan 3, 2012 · 10 comments
Closed

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Jan 3, 2012

Submitted by: @mrotteveel

Jira_subtask_outward JDBC290

The current support for the JDBC escape syntax (section 13.4 JDBC 4.1 spec) is missing some features:
* Limiting Returned Rows Escape (13.4.6)
* Function escape for function names listed in Appendix D need to be doublechecked for completeness (this includes updating the metadata for getXXXFunctions() if necessary)
* Double check support for LIKE escaping (13.4.5)

Commits: afb7254 437bacf 551071f a7363c6 fbb8573 65c68f0

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 5, 2012

Modified by: @mrotteveel

Fix Version: Jaybird 2.3 [ 10440 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 22, 2012

Commented by: @mrotteveel

Current implementation will forward any function call in the escape to Firebird, without considering whether the function is allowed according to appendix D of the JDBC spec.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 22, 2012

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 22, 2012

Commented by: @mrotteveel

Added tests for functions defined in appendix D.1, D.2, D.3 (partially) and D.4; a lot of them are failing right now as Jaybird doesn't support them (yet).

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 23, 2012

Commented by: @mrotteveel

Updated the DatabaseMetaData.getXXXFunctions() method to return those functions that will work on Firebird 2.1 and higher, or with equivalent UDFs installed; no version dependencies are checked, and some functions not included in the list might work if a proper UDF is installed with matching name (and parameter order).

Calling the JDBC function escape with a function name that is not defined in appendix D of JDBC 4.1 will now result in a FBSQLParseException (NOTE: exception type might change before final 2.3 release).

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 23, 2012

Commented by: @mrotteveel

Now most functions are correctly supported.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 24, 2012

Commented by: @mrotteveel

Added test for outer join escape; fixed JDBC LIKE Escape character escape + added tests

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 24, 2012

Commented by: @mrotteveel

Added support for Limiting Returned Rows Escape (section 13.4.6 of JDBC 4.1) {limit <rows> [offset <offset_rows>]}. It has the following limitations:
* Position should match a position that works for the Firebird ROWS clause
* The <rows> parameter can be parametrized (eg {limit ?} or {limit ? offset 10}
* The <offset_rows> parameter can only be a literal value (eg {limit 10 offset 20} or {limit ? offset 20}, a parameter here will result in a FBSQLParseException

The reasons for the first limitation is that the escape is translated in place to a ROWS <m> [TO <n>] clause because having Jaybird decide on the right position would be rather complex. The reason for last limitation is that {limit <rows> offset <offset_rows>} is translated to ROWS <offset_rows> TO <offset_rows> + <rows>, and the repeating parameter for <offset_rows> and reversal of parameter order would be a problem.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 24, 2012

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 7, 2017

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants