DatabaseMetaData
От | Liam Stewart |
---|---|
Тема | DatabaseMetaData |
Дата | |
Msg-id | 20010810110745.A1671@redhat.com обсуждение исходный текст |
Ответы |
Re: DatabaseMetaData
|
Список | pgsql-jdbc |
I've taken a look at the results of the dbMeta tests in the JDBC test suite. I know that Peter has taken a look at these so I've just got some additional notes w.r.t. to failures. In dbMeta1, the test for supportsStoredProcedures fails consistently. The method returns false, but the test harness is expecting true and considers false to be an invalid response. The reason for this is that the JDBC test suite is doing tests for J2EE compliance of the JDBC driver being tested, and one of the conditions is that supportsStoredProcedures should always return true. For regular JDBC compliance, returning false is alright. So, ignore those tests (unless we want the JDBC driver to be J2EE compliant). In the PostgreSQL driver, there are some methods that throw SQLExceptions because they are not implemented yet (isCatalogAtStart, getCatalogSeparator, getUDTs). But other unimplemented methods, such as getTablePrivileges, getVersionColumns, getExportedKeys, and getCrossReference return null. Until they are implemented, they should throw an SQLException. null != empty ResultSet, so getTypeInfo should not have a fallback return value of null, but rather should throw an SQLException when the metadata is not available. In general, I think that better checking for unavailable metadata can be done. The SQLExceptions thrown by unimplemented methods will be caught by the JDBC test harness and the tests will be flagged as errors due to the fact, again, that the test suite is testing for J2EE compliance: all methods should be implemented and none should throw exceptions. For more information on the JDBC and J2EE, see the J2EE Api, section 6.2.2.3. Liam -- Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com
В списке pgsql-jdbc по дате отправления: