- summary: Firebird (and PostgreSQl) changes --> Firebird (and PostgreSQL) changes
22 out of 24 tests in DomainTEST run successfully
for the Firebird database and 21 out of 24 run
successfully for the
PostgreSQL database. The tests
'test030UpdateSequencedKey' and
'test500TimestampOptimisticlocking' fail on the
Firebird database due to the
fact that the standard Timestamp is only accurate to
the nearest seecond.
This can be overcome by using the
'getExactTimestamp()' UDF but I haven't had
time to look into this yet. The same problem occurs
with the PostgreSQL
database.
Below is a list of the classes I have modified and a
brief description of
what has been done.
1) source/com/is/jrf/AbstractColumnSpec.java
Added a 'String tableName' parameter to the
ColumnDefinitionString method
because the Firebird database didn't like the NULL
token as a default value.
The default value can now be specified in the
DatabasePolicy.
2) source/com/is/jrf/AbstractDomain.java
Changed the createTable method which was creating a
new sequence even for a
subtype table. Changed the dropTable method so that
it now goes to the
DatabasePolicy and deletes any generator/sequence
associated with the table
before actually dropping it. Changed the
endTransaction method so that it
goes to the DatabasePolicy checks whether the
JDBCHelper should be closed.
This is true for all databases except Firebird.
3) source/com/is/jrf/ColumnSpec.java
This was changed as a consequence of 1).
4)
source/com/is/jrf/CompoundPrimaryKeyColumnSpec.java
This was changed as a consequence of 1).
5) source/com/is/jrf/CreateTableSQLBuilder.java
This was changed as a consequence of 1).
6) source/com/is/jrf/DatabasePolicy.java
This was changed to an abstract class for greater
flexibility.
7) source/com/is/jrf/HypersonicDatabasePolicy.java
This was changed as a consequence of 6).
8) source/com/is/jrf/InstantDBDatabasePolicy.java
This was changed as a consequence of 6).
9) source/com/is/jrf/MySQLDatabasePolicy.java
This was changed as a consequence of 6).
10) source/com/is/jrf/OracleDatabasePolicy.java
This was changed as a consequence of 6).
11) source/com/is/jrf/PostgreSQLDatabasePolicy.java
Added the dropTable method to delete any associated
sequence.
12)
source/com/is/jrf/SQLServerSybaseDatabasePolicy.java
This was changed as a consequence of 6).
13) source/test/DomainTEST.java
This was changed because creating and dropping tables
for every test crashed
the Firebird database. Note, this is only a
temporary solution. I'm sure
you guys will come up with a better way.
14) source/test/EmployeeDomain.java
Added a retJDBCHelper method.
15) source/test/ManufacturerDomain.java
Added a retJDBCHelper method.
16) source/test/PartDomain.java
Added a retJDBCHelper method.
17) source/test/PersonDomain.java
Added a retJDBCHelper method.