You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change metadata queries to always return VARCHAR for strings. Some columns in the metadata are currently declared as CHAR instead of VARCHAR, this can cause problems, see http://youtrack.jetbrains.com/issue/IDEA-100786 for an example.
The weird thing is that when checking the metadata with a simple program, the returned string is of the actual length and not of the declared CHAR(31) length
Changed all queries to use VARCHARs, I am leaving this open for now to see if I can find the cause for the difference in behaviour described in the IntelliJ IDEA ticket.
As described in the ticket with Jetbrains, Jaybird would only trim the strings for metadata ResultSets if the getString() method was called, IntelliJ only calls getString() for Types.VARCHAR, but the columnType was Types.CHAR so getObject() was called and the string wasn't trimmed.
I am considering a solution where I replace the current metadata boolean in ResultSet with using a separate ResultSet subclass for metadata and/or using a StringField subclass/wrapper for metadata that will take care of trimming. This might also make for a 'prettier' solution than all those CAST(... AS VARCHAR(31)) in a large number of queries (and it might increase forward compatibility if identifiers can become larger in future versions).
Submitted by: @mrotteveel
Jira_subtask_outward JDBC310
Change metadata queries to always return VARCHAR for strings. Some columns in the metadata are currently declared as CHAR instead of VARCHAR, this can cause problems, see http://youtrack.jetbrains.com/issue/IDEA-100786 for an example.
The weird thing is that when checking the metadata with a simple program, the returned string is of the actual length and not of the declared CHAR(31) length
Commits: b69af05 f645829 1b58474 FirebirdSQL/fbt-repository@58f0886 FirebirdSQL/fbt-repository@700abcc FirebirdSQL/fbt-repository@a867b8d
The text was updated successfully, but these errors were encountered: