-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Report true for ResultSetMetaData.isAutoIncrement for identity columns #793
Comments
Yes I have this need to run Jaybird under LibreOffice Base. When it is in table edition mode it performs an SQL query on the table: SELECT * FROM "Table1" WHERE 0 = 1. |
For LibreOffice, I would recommend using its built-in Firebird support instead of continuing to use Jaybird for that. |
I think it would be more appropriate to rejoice in this port. It has already made it possible to identify numerous malfunctions in a short time. It's my opinion. |
Backported to Jaybird 5.0.5 |
Thanks Mark, I will integrate it into the next version of jdbcDriverOOo. |
Includes: #731 FBResultSetMetaData.getExtendedFieldInfo will query same set of fields when there are more than 70 fields #732 Optimize FBResultSetMetaData.getExtendedFieldInfo #793 Report true for ResultSetMetaData.isAutoIncrement for identity columns #795 Add connection property to disable retrieval of extended field info for ResultSetMetaData #795 Implement disabling of retrieval of extended field info for ResultSetMetaData
@prrvchr If you want, you can test it with the 5.0.5.java8-SNAPSHOT or 5.0.5.java11-SNAPSHOT from the Sonatype OSS snapshot repository (https://oss.sonatype.org/content/repositories/snapshots). |
I just tried 5.0.5. This works perfectly, the auto increment columns are clearly seen by Base. I thank you. |
On the other hand, I get a message when I first open it telling me that the ResultSet is closed, then if I insist it starts working... Weird... |
Do you have a stacktrace for that? |
You might be confronted with the problem that LibreOffice expects (or expected) holdable result sets by default. The OpenOffice/LibreOffice specific protocol (deprecated in Jaybird 5, removed in Jaybird 6) would explicitly call |
Hi Mark, I just tried again with the
---What surprises me is that I had no problems of this type with version 5.0.4. Has anything changed?--- I just retested in 5.0.4 and I actually have the same problem, I don't know where my regression comes from... |
Ok the problem is solved it is imperative to create the PreparedStatement with the option I don't understand why I could get Jaybird to work in Base without this option??? Sometimes you shouldn't try to understand... |
That is a warning, which - per the JDBC specification - is added to the connection when the result set type is upgraded. It is not thrown as an exception. I'm not sure why LibreOffice would report that as an error. Did you try this with 6.0.0-SNAPSHOT or with 5.0.5? |
I guess you initially used |
To be exact, there is a difference in the implementation of JDBC and UNO SDBC APIs at the PreparedStatement level. With UNO, the ResultSet type and concurrency are a property of the PreparedStatement, which requires me to create the JDBC PreparedStatement only when executed for the first time at the UNO level (since only then do I know if the type and concurrency options have been modified or not)
When executing a PreparedStatement under the UNO API there are two possibilities:
This is what has worked so far, but I think this is what is causing me the problem. I have not tried with version 6.0.0-SNAPSHOT. Where can I find it? |
Same place as the 5.0.5-SNAPSHOT, the Sonatype OSS snapshot Maven repository: https://oss.sonatype.org/content/repositories/snapshots/ (Jaybird can be found in https://oss.sonatype.org/content/repositories/snapshots/org/firebirdsql/jdbc/jaybird/ ) |
I will try with version 6. I seem to have read that the option |
The JDBC 4.3 specification (section 15.1.3.1) says:
This has been the case since their introduction in JDBC 3.0 (Java 1.4). It also says (since JDBC 4.0/Java 6):
The reason it is not the default in Jaybird is because holdable result sets either require Jaybird to fiddle with transaction lifetimes using commit/rollback retain and terminate the actual transaction later (which is complex and error prone), or requires materializing the entire result set in memory by default instead of now only in the exceptional cases (which is inefficient, so best avoided if not needed), or materialize the remainder of the result set at transaction end. |
Well everything is back to normal, I don't really know where it came from. I suspect too much change to release this new version. The new version 5.0.5 is available in the latest version of jdbcDriverOOo 1.3.1. It allows the administration of users, roles and privileges on tables and views. Thank you for your help. |
To be clear, 5.0.5 is not yet released, what I linked was a snapshot for testing purposes. You shouldn't depend on it for released versions IMHO. |
You're right, but it's done... I will update it as soon as 5.0.5 is available... |
Implement returning true from
ResultSetMetaData.isAutoIncrement
for identity columns. This will require querying the metadata tables, as this information is not available through the statement info API.Split off from #792
The text was updated successfully, but these errors were encountered: