1 package org.apache.torque.engine.platform; 2 3 18 19 import org.apache.torque.engine.database.model.Domain; 20 import org.apache.torque.engine.database.model.SchemaType; 21 22 28 public class PlatformPostgresqlImpl extends PlatformDefaultImpl 29 { 30 33 public PlatformPostgresqlImpl() 34 { 35 super(); 36 initialize(); 37 } 38 39 42 private void initialize() 43 { 44 setSchemaDomainMapping(new Domain(SchemaType.BIT, "BOOLEAN")); 45 setSchemaDomainMapping(new Domain(SchemaType.TINYINT, "INT2")); 46 setSchemaDomainMapping(new Domain(SchemaType.SMALLINT, "INT2")); 47 setSchemaDomainMapping(new Domain(SchemaType.BIGINT, "INT8")); 48 setSchemaDomainMapping(new Domain(SchemaType.REAL, "FLOAT")); 49 setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "CHAR")); 51 setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "INT2")); 53 setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "DOUBLE PRECISION")); 54 setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "TEXT")); 55 setSchemaDomainMapping(new Domain(SchemaType.BINARY, "BYTEA")); 56 setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "BYTEA")); 57 setSchemaDomainMapping(new Domain(SchemaType.LONGVARBINARY, "BYTEA")); 58 setSchemaDomainMapping(new Domain(SchemaType.BLOB, "BYTEA")); 59 setSchemaDomainMapping(new Domain(SchemaType.CLOB, "TEXT")); 60 } 61 62 65 public String getNativeIdMethod() 66 { 67 return Platform.SEQUENCE; 68 } 69 70 73 public String getAutoIncrement() 74 { 75 return ""; 76 } 77 78 } 79 | Popular Tags |