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"); }
dbDdlSyntax.setMaxConstraintNameLength(30);