public Postgres8Platform() { super(); this.dbIdentity.setSupportsGetGeneratedKeys(false); this.dbIdentity.setIdType(IdType.SEQUENCE); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); this.columnAliasPrefix = "as c"; }
public HsqldbPlatform() { super(); this.platform = Platform.HSQLDB; this.dbEncrypt = new H2DbEncrypt(); this.platformDdl = new HsqldbDdl(this); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); dbTypeMap.put(DbType.INTEGER, new DbPlatformType("integer", false)); }
public DB2Platform() { super(); this.platform = Platform.DB2; this.maxTableNameLength = 18; this.maxConstraintNameLength = 18; this.sqlLimiter = new Db2SqlLimiter(); this.platformDdl = new DB2Ddl(this); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); booleanDbType = Types.BOOLEAN; dbTypeMap.put(DbType.REAL, new DbPlatformType("real")); dbTypeMap.put(DbType.TINYINT, new DbPlatformType("smallint")); dbTypeMap.put(DbType.DECIMAL, new DbPlatformType("decimal", 15)); }
public H2Platform() { super(); this.platform = Platform.H2; this.dbEncrypt = new H2DbEncrypt(); this.platformDdl = new H2Ddl(this); this.historySupport = new H2HistorySupport(); this.nativeUuidType = true; this.dbDefaultValue.setNow("now()"); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); // like ? escape'' not working in the latest version H2 so just using no // escape clause for now noting that backslash is an escape char for like in H2 this.likeClause = "like ?"; dbTypeMap.put(DbType.UUID, new DbPlatformType("uuid", false)); }
public H2Platform() { super(); this.name = "h2"; this.dbEncrypt = new H2DbEncrypt(); // only support getGeneratedKeys with non-batch JDBC // so generally use SEQUENCE instead of IDENTITY for H2 boolean useIdentity = GlobalProperties.getBoolean("ebean.h2platform.useIdentity", false); IdType idType = useIdentity ? IdType.IDENTITY : IdType.SEQUENCE; this.dbIdentity.setIdType(idType); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); this.openQuote = "\""; this.closeQuote = "\""; // H2 data types match default JDBC types // so no changes to dbTypeMap required this.dbDdlSyntax.setDropIfExists("if exists"); this.dbDdlSyntax.setDisableReferentialIntegrity("SET REFERENTIAL_INTEGRITY FALSE"); this.dbDdlSyntax.setEnableReferentialIntegrity("SET REFERENTIAL_INTEGRITY TRUE"); this.dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); }
public H2Platform() { super(); this.name = "h2"; this.dbEncrypt = new H2DbEncrypt(); // only support getGeneratedKeys with non-batch JDBC // so generally use SEQUENCE instead of IDENTITY for H2 boolean useIdentity = GlobalProperties.getBoolean("ebean.h2platform.useIdentity", false); IdType idType = useIdentity ? IdType.IDENTITY : IdType.SEQUENCE; this.dbIdentity.setIdType(idType); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); this.openQuote = "\""; this.closeQuote = "\""; // H2 data types match default JDBC types // so no changes to dbTypeMap required this.dbDdlSyntax.setDropIfExists("if exists"); this.dbDdlSyntax.setDisableReferentialIntegrity("SET REFERENTIAL_INTEGRITY FALSE"); this.dbDdlSyntax.setEnableReferentialIntegrity("SET REFERENTIAL_INTEGRITY TRUE"); this.dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); }
public SQLitePlatform() { super(); this.platform = Platform.SQLITE; this.platformDdl = new SQLiteDdl(this); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(false); this.dbIdentity.setSupportsSequence(false); this.dbIdentity.setSelectLastInsertedIdTemplate("select last_insert_rowid()"); this.booleanDbType = Types.INTEGER; dbTypeMap.put(DbType.BIT, new DbPlatformType("int default 0")); dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("int default 0")); dbTypeMap.put(DbType.BIGINT, new DbPlatformType("integer")); dbTypeMap.put(DbType.SMALLINT, new DbPlatformType("integer")); }
public HsqldbPlatform(){ super(); this.name = "hsqldb"; this.dbEncrypt = new H2DbEncrypt(); // only support getGeneratedKeys with non-batch JDBC // so generally use SEQUENCE instead of IDENTITY for H2 boolean useIdentity = GlobalProperties.getBoolean("ebean.hsqldb.useIdentity", true); IdType idType = useIdentity ? IdType.IDENTITY : IdType.SEQUENCE; this.dbIdentity.setIdType(idType); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); this.openQuote = "\""; this.closeQuote = "\""; // H2 data types match default JDBC types // so no changes to dbTypeMap required dbTypeMap.put(Types.INTEGER, new DbType("integer",false)); this.dbDdlSyntax.setDropIfExists("if exists"); this.dbDdlSyntax.setDisableReferentialIntegrity("SET DATABASE REFERENTIAL INTEGRITY FALSE"); this.dbDdlSyntax.setEnableReferentialIntegrity("SET DATABASE REFERENTIAL INTEGRITY TRUE"); this.dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); this.dbDdlSyntax.setIdentity("GENERATED BY DEFAULT AS IDENTITY (START WITH 1) "); }
public HsqldbPlatform() { super(); this.name = "hsqldb"; this.dbEncrypt = new H2DbEncrypt(); // only support getGeneratedKeys with non-batch JDBC // so generally use SEQUENCE instead of IDENTITY for H2 boolean useIdentity = GlobalProperties.getBoolean("ebean.hsqldb.useIdentity", true); IdType idType = useIdentity ? IdType.IDENTITY : IdType.SEQUENCE; this.dbIdentity.setIdType(idType); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); this.openQuote = "\""; this.closeQuote = "\""; // H2 data types match default JDBC types // so no changes to dbTypeMap required dbTypeMap.put(Types.INTEGER, new DbType("integer", false)); this.dbDdlSyntax.setDropIfExists("if exists"); this.dbDdlSyntax.setDisableReferentialIntegrity("SET DATABASE REFERENTIAL INTEGRITY FALSE"); this.dbDdlSyntax.setEnableReferentialIntegrity("SET DATABASE REFERENTIAL INTEGRITY TRUE"); this.dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); this.dbDdlSyntax.setIdentity("GENERATED BY DEFAULT AS IDENTITY (START WITH 1) "); }
public DB2Platform(){ super(); this.name = "db2"; // only support getGeneratedKeys with non-batch JDBC // so generally use SEQUENCE instead for H2 this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsSequence(true); this.openQuote = "\""; this.closeQuote = "\""; booleanDbType = Types.INTEGER; dbTypeMap.put(Types.BOOLEAN, new DbType("smallint default 0")); dbTypeMap.put(Types.INTEGER, new DbType("integer")); dbTypeMap.put(Types.BIGINT, new DbType("bigint")); dbTypeMap.put(Types.REAL, new DbType("float")); dbTypeMap.put(Types.DOUBLE, new DbType("float")); dbTypeMap.put(Types.SMALLINT, new DbType("smallint")); dbTypeMap.put(Types.TINYINT, new DbType("smallint")); dbTypeMap.put(Types.DECIMAL, new DbType("decimal", 15)); this.dbDdlSyntax.setIdentity("generated by default as identity"); //this.dbDdlSyntax.setDropIfExists("if exists"); //this.dbDdlSyntax.setDisableReferentialIntegrity("SET REFERENTIAL_INTEGRITY FALSE"); //this.dbDdlSyntax.setEnableReferentialIntegrity("SET REFERENTIAL_INTEGRITY TRUE"); //this.dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); }
public DB2Platform() { super(); this.name = "db2"; // only support getGeneratedKeys with non-batch JDBC // so generally use SEQUENCE instead for H2 this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsSequence(true); this.openQuote = "\""; this.closeQuote = "\""; booleanDbType = Types.INTEGER; dbTypeMap.put(Types.BOOLEAN, new DbType("smallint default 0")); dbTypeMap.put(Types.INTEGER, new DbType("integer")); dbTypeMap.put(Types.BIGINT, new DbType("bigint")); dbTypeMap.put(Types.REAL, new DbType("float")); dbTypeMap.put(Types.DOUBLE, new DbType("float")); dbTypeMap.put(Types.SMALLINT, new DbType("smallint")); dbTypeMap.put(Types.TINYINT, new DbType("smallint")); dbTypeMap.put(Types.DECIMAL, new DbType("decimal", 15)); this.dbDdlSyntax.setIdentity("generated by default as identity"); // this.dbDdlSyntax.setDropIfExists("if exists"); // this.dbDdlSyntax.setDisableReferentialIntegrity("SET REFERENTIAL_INTEGRITY FALSE"); // this.dbDdlSyntax.setEnableReferentialIntegrity("SET REFERENTIAL_INTEGRITY TRUE"); // this.dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); }
public MySqlPlatform() { super(); this.platform = Platform.MYSQL; this.useExtraTransactionOnIterateSecondaryQueries = true; this.likeClause = "like ? escape''"; this.selectCountWithAlias = true; this.dbEncrypt = new MySqlDbEncrypt(); this.platformDdl = new MySqlDdl(this); this.historySupport = new MySqlHistorySupport(); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsIdentity(true); this.dbIdentity.setSupportsSequence(false); this.openQuote = "`"; this.closeQuote = "`"; this.forwardOnlyHintOnFindIterate = true; this.booleanDbType = Types.BIT; dbTypeMap.put(DbType.BIT, new DbPlatformType("tinyint(1) default 0")); dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("tinyint(1) default 0")); dbTypeMap.put(DbType.TIMESTAMP, new DbPlatformType("datetime(6)")); dbTypeMap.put(DbType.CLOB, new MySqlClob()); dbTypeMap.put(DbType.BLOB, new MySqlBlob()); dbTypeMap.put(DbType.BINARY, new DbPlatformType("binary", 255)); dbTypeMap.put(DbType.VARBINARY, new DbPlatformType("varbinary", 255)); }
public MySqlPlatform(){ super(); this.name = "mysql"; this.selectCountWithAlias = true; this.dbEncrypt = new MySqlDbEncrypt(); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsIdentity(true); this.dbIdentity.setSupportsSequence(false); this.openQuote = "`"; this.closeQuote = "`"; this.booleanDbType = Types.BIT; dbTypeMap.put(Types.BIT, new DbType("tinyint(1) default 0")); dbTypeMap.put(Types.BOOLEAN, new DbType("tinyint(1) default 0")); dbTypeMap.put(Types.TIMESTAMP, new DbType("datetime")); dbTypeMap.put(Types.CLOB, new MySqlClob()); dbTypeMap.put(Types.BLOB, new MySqlBlob()); dbTypeMap.put(Types.BINARY, new DbType("binary",255)); dbTypeMap.put(Types.VARBINARY, new DbType("varbinary",255)); dbDdlSyntax.setMaxConstraintNameLength(64); dbDdlSyntax.setDisableReferentialIntegrity("SET FOREIGN_KEY_CHECKS=0"); dbDdlSyntax.setEnableReferentialIntegrity("SET FOREIGN_KEY_CHECKS=1"); dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); }
public MySqlPlatform() { super(); this.name = "mysql"; this.selectCountWithAlias = true; this.dbEncrypt = new MySqlDbEncrypt(); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsIdentity(true); this.dbIdentity.setSupportsSequence(false); this.openQuote = "`"; this.closeQuote = "`"; this.booleanDbType = Types.BIT; dbTypeMap.put(Types.BIT, new DbType("tinyint(1) default 0")); dbTypeMap.put(Types.BOOLEAN, new DbType("tinyint(1) default 0")); dbTypeMap.put(Types.TIMESTAMP, new DbType("datetime")); dbTypeMap.put(Types.CLOB, new MySqlClob()); dbTypeMap.put(Types.BLOB, new MySqlBlob()); dbTypeMap.put(Types.BINARY, new DbType("binary", 255)); dbTypeMap.put(Types.VARBINARY, new DbType("varbinary", 255)); dbDdlSyntax.setMaxConstraintNameLength(64); dbDdlSyntax.setDisableReferentialIntegrity("SET FOREIGN_KEY_CHECKS=0"); dbDdlSyntax.setEnableReferentialIntegrity("SET FOREIGN_KEY_CHECKS=1"); dbDdlSyntax.setForeignKeySuffix("on delete restrict on update restrict"); }
this.dbIdentity.setSupportsSequence(true);
this.dbIdentity.setSupportsSequence(true);
this.dbIdentity.setSupportsSequence(true);
dbIdentity.setSupportsSequence(true);
dbIdentity.setSupportsSequence(true);
dbIdentity.setSupportsSequence(true);