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

Improve JDBC escape function implementation for CONVERT [JDBC294] #340

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

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

The current JDBC function escape CONVERT implementation does not support the conversion specified in JDBC 4.1 (which have a SQL_ prefix), because it simply maps it "CAST({0} AS {1})".

This also doesn't work for conversions which require a length (CHAR/VARCHAR) and precision (NUMERIC/DECIMAL), as the CONVERT specification (see ODBC documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms715381%28v=vs.85%29.aspx ), does not include length or precision.

Commits: 3c4c184 ccd5fc3

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.3 [ 10440 ]

description: The current JDBC function escape CONVERT implementation does not support the conversion specified in JDBC 4.1 (which have a SQL_ prefix), because it simply maps it "CAST({0} AS {1})".

This also doesn't work for conversions which require a length (CHAR/VARCHAR) and precision (NUMERIC/DECIMAL), as the CONVERT specification (see ODBC documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms715381%28v=vs.85%29.aspx ), does not include length or precision.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.1 [ 10441 ]

Fix Version: Jaybird 3.0 [ 10440 ] =>

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Implemented

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

DatabaseMetaData.supportsConvert() and DatabaseMetaData.supportsConvert(int, int) need to be implemented as well.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Reopened [ 4 ]

resolution: Fixed [ 1 ] =>

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Implemented supportsConvert

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Reopened [ 4 ] => 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