Example usage for org.hibernate.dialect MySQLDialect MySQLDialect

List of usage examples for org.hibernate.dialect MySQLDialect MySQLDialect

Introduction

In this page you can find the example usage for org.hibernate.dialect MySQLDialect MySQLDialect.

Prototype

public MySQLDialect() 

Source Link

Document

Constructs a MySQLDialect

Usage

From source file:com.manydesigns.portofino.database.platforms.GoogleCloudSQLDatabasePlatform.java

License:Open Source License

public GoogleCloudSQLDatabasePlatform() {
    super(new MySQLDialect(), "jdbc:google:rdbms://<instance-name>/<database>");
    try {//  w  w w.  j  a v  a 2s .c om
        DriverManager.registerDriver((Driver) Class.forName("com.google.cloud.sql.Driver").newInstance());
    } catch (Exception e) {
        logger.debug("The driver to connect to Google Cloud SQL from a non-GAE application was not found", e);
    }
}

From source file:com.manydesigns.portofino.database.platforms.MySql5DatabasePlatform.java

License:Open Source License

public MySql5DatabasePlatform() {
    super(new MySQLDialect(), "jdbc:mysql://<host>[:<port>]/<database>");
}

From source file:de.xore.util.persistence.hibernate.HibernateDatabaseConnector.java

License:Open Source License

public String[] getDrop() {
    return annotationConfiguration.generateDropSchemaScript(new MySQLDialect());
}

From source file:org.efs.openreports.util.schema.SchemaGenerator.java

License:Open Source License

public static void main(String[] args) {
    try {// w  ww .  j  av a 2 s  . c  o  m
        Configuration cfg = new Configuration().configure();

        String[] scripts = cfg.generateSchemaCreationScript(new HSQLDialect());
        writeFile("or_ddl_hsqldb.sql", scripts);

        scripts = cfg.generateSchemaCreationScript(new MySQLDialect());
        writeFile("or_ddl_mysql.sql", scripts);

        scripts = cfg.generateSchemaCreationScript(new SybaseDialect());
        writeFile("or_ddl_sybase.sql", scripts);

        scripts = cfg.generateSchemaCreationScript(new DB2Dialect());
        writeFile("or_ddl_db2.sql", scripts);

        // hibernate bug?
        cfg = new Configuration().configure();

        scripts = cfg.generateSchemaCreationScript(new PostgreSQLDialect());
        writeFile("or_ddl_postgre.sql", scripts);

        scripts = cfg.generateSchemaCreationScript(new Oracle9Dialect());
        writeFile("or_ddl_oracle.sql", scripts);

        //hibernate bug?
        cfg = new Configuration().configure();

        scripts = cfg.generateSchemaCreationScript(new SQLServerDialect());
        writeFile("or_ddl_sqlserver.sql", scripts);

        //hibernate bug?
        cfg = new Configuration().configure();

        scripts = cfg.generateSchemaCreationScript(new DerbyDialect());
        writeFile("or_ddl_derby.sql", scripts);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:org.jboss.aerogear.unifiedpush.jpa.MysqlDialectResolver.java

License:Apache License

@Override
public Dialect resolveDialect(DialectResolutionInfo dialectResolutionInfo) {
    if ("MySQL".equals(dialectResolutionInfo.getDatabaseName())) {
        return dialectResolutionInfo.getDatabaseMajorVersion() >= 5 ? new Mysql5BitBooleanDialect()
                : new MySQLDialect();
    }//w  w  w  .  j  a v  a2 s . c o m
    return null;
}