Table of Contents

This webpage tracks the tests needed to support JDBC 4.1. See https://issues.apache.org/jira/browse/DERBY-4869

JDBC 4.1 Testing

Legend:

Status

Method

Description

Testing Detail

Size

Owner

(./)

CallableStatement.getObject(int,Class)

Optional new method. Retrieves an OUT or INOUT parameter as the desired class type.

Test:CallableStatementTest Existing JIRA: DERBY-4609, DERBY-695 Suggest to add tests for: Types.BIT, Types.DECIMAL

Medium

Lily

(./)

CallableStatement.getObject(String,Class)

Optional new method. See getObject(int,Class).

Not supported for CallableStatement40 New JIRA: DERBY-5108(Throw SQLFeatureNotSupportedException) Test:CallableStatementTest

Small

Lily

(./)

Connection.abort(Executor)

Mandatory new method. Closes the Connection and lets the Executor release resources lazily.

Add to JDBC 4 implementation (requires java.util.concurrent.Executor interface which was introduced in Java 5). Test:ConnectionMethodsTest

Medium

Lily

(./)

Connection.getNetworkTimeout()

Optional new method.

Throw SQLFeatureNotSupportedException. Test:ConnectionMethodsTest

Small

Lily

(./)

Connection.getTypeMap()

Spec clarification.

No action needed. Test:ConnectionTest(added)

None

Lily

(./)

Connection.getSchema()

Mandatory new method. Gets the name of the session's schema.

Add to JSR 169 implementation.Test:ConnectionMethodsTest

Small

Lily

(./)

Connection.setNetworkTimeout(Executor,int)

Optional new method. Sets the client timeout.

Throw SQLFeatureNotSupportedException.Test:ConnectionMethodsTest

Small

Lily

(./)

Connection.setSchema(String)

Mandatory new method. Sets the name of the session's schema.

Add to JSR 169 implementation.Test:ConnectionMethodsTest

Small

Lily

(./)

Connection.setTypeMap(Map)

Spec clarification.

No action needed.(Throw SQLFeatureNotSupportedException) Test:ConnectionTest(added)J2EEDataSourceTest

None

Lily

(./)

DBMD.generatedKeyAlwaysReturned()

Mandatory new method. Reports whether Statement.getGeneratedKeys() always returns a ResultSet even after Statement.execute(String query, String[] columnNames) is called with columnNames that are not identity columns.

Embedded Derby throws an exception if you call execute(String,String[]) with columnNames that are not identity columns, so the return value of getGeneracase, getGeneratedKeys() returns a ResultSet with generated values. Note that Derby only allows you to define one identity column per table. Because of the network behavior, I think that DBMD.generatedKeyAlwaysReturned() should return true.Test:DatabaseMetaDataTest

Small

Lily

(./)

DBMD.getPseudoColumns(String,String,String,String)

Mandatory new method. Shows the hidden columns in a table.

Derby doesn't have hidden columns. Return an empty ResultSet with the correct column structure.Test:DatabaseMetaDataTest

Small

Lily

(./)

DBMD.getColumns(String,String,String,String)

Changed method. New field reports whether a column is generated as defined by the SQL Standard, part 2, section 4.14.8. These are columns defined by generation clauses built out of deterministic expressions involving other columns in the row. These are what Derby call generaated colmns

Add this field to the metadata query.Test:DatabaseMetaDataTest

Small

Lily

(./)

DBMD.getProcedureColumns(String,String,String,String)

Spec clarification.

Nothing to do.Test:DatabaseMetaDataTest

None

Lily

(./)

DBMD.supportsStatementPooling()

Spec clarification.

Nothing to do.Test:DatabaseMetaDataTest

None

Lily

(./)

Driver.getParentLogger()

Optional new method. Returns the root logger for this Driver.

Derby doesn't use java.util.logging so this method can throw SQLFeatureNotSupportedException.

Small

Lily

(./)

PreparedStatement.execute()

Should throw a SQLTimeoutException if the query runs beyond the limit set by setQueryTimeout().

The timeout work done for Statement.execute() should apply here. Test:StatementTest Note:timeout value is per row basis

Small

Lily

(./)

PreparedStatement.executeQuery()

Should throw a SQLTimeoutException if the query runs beyond the limit set by setQueryTimeout().

The timeout work done for Statement.execute() should apply here. Test:StatementTest

Small

Lily

(./)

PreparedStatement.executeUpdate()

Should throw a SQLTimeoutException if the query runs beyond the limit set by setQueryTimeout().

The timeout work done for Statement.execute() should apply here.Test:StatementTest

Small

Lily

(./)

ResultSet.absolute(int)

If the argument is 0, then the ResultSet is positioned before the first row.

Verify that Derby behaves this way. If it doesn't, make this change. Note that Derby does behave this way. This is verified by ScrollCursors2Test.testScrollInsensitivePositive()

Small

Lily

(./)

ResultSet.getObject(int,Class)

Optional new method. Returns the column as an object of the requested type, provided that the coercion is supported in Appendix B, table B-1.

Add this overload to the JDBC 4 implementation (uses generics). Some testing may be required to verify that Derby really supports the required coercions. Test:ResultSetTest

Medium

Lily

(./)

ResultSet.getObject(String,Class)

Mandatory new method. Behaves like getObject(int,Class).

The work done for getObject(int,Class) should apply here. Test:ResultSetTest

Small

Lily

(./)

Statement.addBatch(String)

Clarifies that this method can't be called on a PreparedStatement or CallableStatement.

Verify that Derby behaves this way. If it doesn't, make this change.Test:StatementJdbc20Test

Small

Lily

(./)

Statement.closeOnCompletion()

Mandatory new method. Automatically close the Statement when its dependent objects (like ResultSets) are closed.

Implement this behavior. Test:StatementTest

Medium

Lily

(./)

Statement.execute(String)

Throw SQLTimeoutException when the statement times out. Also don't allow this method to be called on PreparedStatements or CallableStatements.

Implement this behavior.Test:StatementTest

Medium

Lily

(./)

Statement.execute(String,int)

See Statement.execute(String).

Changes for execute(String) should apply here. Test:StatementJdbc20Test

Small

Lily

(./)

Statement.execute(String,int[])

See Statement.execute(String).

Changes for execute(String) should apply here. Test:StatementJdbc20Test

Small

Lily

(./)

Statement.execute(String,String[])

See Statement.execute(String).

Changes for execute(String) should apply here.Test:StatementJdbc20Test

Small

Lily

(./)

Statement.executeBatch()

Throw SQLTimeoutException as for Statement.execute(String).

Changes for execute(String) should apply here. Test:BatchUpdateTest

Small

Lily

(./)

Statement.executeQuery(String)

See Statement.execute(String).

Changes for execute(String) should apply here. Test:StatementTest

Small

Lily

(./)

Statement.executeUpdate(String)

See Statement.execute(String).

Changes for execute(String) should apply here.Test:StatementTest

Small

Lily

(./)

Statement.executeUpdate(String,int)

See Statement.execute(String).

Changes for execute(String) should apply here Test:StatementJdbc20Test

Small

Lily

(./)

Statement.executeUpdate(String,int[])

See Statement.execute(String).

Changes for execute(String) should apply here.Test:StatementJdbc20Test

Small

Lily

(./)

Statement.executeUpdate(String,String[])

See Statement.execute(String).

Changes for execute(String) should apply here.Test:StatementJdbc20Test

Small

Lily

(./)

Statement.isCloseOnCompletion()

Mandatory new method. Reports whether the Statement automatically closes when its dependent objects (like ResultSets) are closed.

Implement this behavior. Test:StatementTest

Small

Lily

(./)

Statement.setQueryTimeout(int)

Spec clarification.

Nothing to do. Test:StatementTest

None

Lily

(./)

CommonDataSource.getParentLogger()

Optional new method. Returns the root logger for this data source.

Derby doesn't use java.util.logging so this method can throw SQLFeatureNotSupportedException. Test: DataSourceTest

Small

Lily

JdbcFourOneTesting (last edited 2011-04-21 17:43:53 by MamtaSatoor)