Subject Patches (II)
Author Blas Rodriguez Somoza
Hello

After the work I make yesterday and because the good response from Roman, I continue with the tests and patches.

Actually, firebird jdbc support only type FORWARD and concurrency READ_ONLY, and don't support updatable resultSets.

I propose some patches to make the driver work according to the specification, taking into account what it actually implements.
The patches are related with resultSetType and Concurrency. Because the connection warnings are used in the CreateStatement etc, the
warning methods for Connection, Statement and ResultSet are patched also. Finally because updatable result sets are not implemented,
methods related with it in the databasemetadata class can return false.

1.- FBResultSet (Added a warning global variable to the class)
->getType() Must return java.sql.ResultSet.TYPE_FORWARD_ONLY
->getConcurrency() must return java.sql.ResultSet.CONCUR_READ_ONLY
->getFetchDirection() must return java.sql.ResultSet.FETCH_FORWARD.
->setFecthDirection() must throw exception if the type is not FETCH_FORWARD
->getWarnings() implemented
->clearWarnings() implemented
->addWarning(warning) new utility method
2.- FBStatement (Added a warning global variable to the class)
->getType() Must return java.sql.ResultSet.TYPE_FORWARD_ONLY
->getConcurrency() must return java.sql.ResultSet.CONCUR_READ_ONLY
->getFetchDirection() must return java.sql.ResultSet.FETCH_FORWARD.
->setFetchDirection() must throw exception if the type is not FETCH_FORWARD
->getWarnings() implemented
->clearWarnings() implemented
->addWarning(warning) new utility method
3.- FBConnection (Added a warning global variable to the class)
->createStatement(type,concurrency) must return a normal statement. If the type requested is not FORWARD,READ-ONLY then it must add
warnings to the warning chain because the type or concurrency is changed. (see jdbc30 14.1.1 and 14.1.2)
->prepareStatement(sql,type,concurrency) the same as createStatement.
->prepareCall(sql,type,concurrency) the same as createStatement.
->getWarnings() must return the first warning in the warning chain (now it returns null)
->clearWarnings() must set the first warning to null.
->addWarning(warning) new utility method
4.- FBDatabaseMetaData
-> supportsResultSetType(int) must be false except for TYPE_FORWARD.
-> supportsResultSetConcurrency(int,int) must be false except for CONCUR_READ_ONLY.
->ownDeletesAreVisible(int) must be false for all.
->ownInsertsAreVisible(int) must be false for all.
->ownUpdatesAreVisible(int) must be false for all.
->othersDeletesAreVisible(int) must be false for all.
->othersInsertsAreVisible(int) must be false for all.
->othersUpdatesAreVisible(int) must be false for all.
->deletesAreDetected(int) must be false for all.
->insertsAreDetected(int) must be false for all.
->updatesAreDetected(int) must be false for all.

I send the text file with the methods modified with the mail.

Regards
Blas Rodriguez Somoza