01: package net.sourceforge.jaxor.example.db;
02:
03: import java.sql.Types;
04:
05: /**
06: * Created By: Mike
07: * Date: Nov 28, 2003
08: * Time: 4:36:32 PM
09: *
10: * Last Checkin: $Author: mrettig $
11: * Date: $Date: 2004/01/24 17:55:06 $
12: * Revision: $Revision: 1.1 $
13: */
14: public class PostgresContextTestingFactory extends
15: JaxorContextTestingFactoryImpl {
16:
17: public PostgresContextTestingFactory() {
18: super (PostgresConnection.INSTANCE.getConnection(), true);
19: }
20:
21: public String getCreateTable(int type) {
22: if (type == Types.DOUBLE)
23: return "float8";
24: if (type == Types.TINYINT)
25: return "int2";
26: if (type == Types.BIGINT)
27: return "NUMERIC(10)";
28: if (type == Types.BIT)
29: return "BOOL";
30: return super .getCreateTable(type);
31: }
32:
33: public boolean capitalizeTableNameForMetaData() {
34: return false;
35: }
36: }
|