org.sonar.core.persistence.dialect
Class MySql

java.lang.Object
  extended by org.sonar.core.persistence.dialect.MySql
All Implemented Interfaces:
Dialect

public class MySql
extends Object
implements Dialect

Since:
1.12

Nested Class Summary
static class MySql.MySqlWithDecimalDialect
           
 
Field Summary
static String ID
           
 
Constructor Summary
MySql()
           
 
Method Summary
 String getActiveRecordDialectCode()
           
 String getActiveRecordJdbcAdapter()
           
 String getConnectionInitStatement(String schema)
           
 String getDefaultDriverClassName()
           
 String getFalseSqlValue()
           
 Class<? extends org.hibernate.dialect.Dialect> getHibernateDialectClass()
           
 String getId()
           
 String getTrueSqlValue()
           
 boolean matchesJdbcURL(String jdbcConnectionURL)
          Used to autodetect a dialect for a given driver URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values
Constructor Detail

MySql

public MySql()
Method Detail

getId

public String getId()
Specified by:
getId in interface Dialect
Returns:
the sonar dialect Id to be matched with the sonar.jdbc.dialect property when provided

getActiveRecordDialectCode

public String getActiveRecordDialectCode()
Specified by:
getActiveRecordDialectCode in interface Dialect
Returns:
the activerecord dialect to be used

getActiveRecordJdbcAdapter

public String getActiveRecordJdbcAdapter()
Specified by:
getActiveRecordJdbcAdapter in interface Dialect
Returns:
the activerecord-jdbc adapter. See the property 'adapter' in database.yml

getHibernateDialectClass

public Class<? extends org.hibernate.dialect.Dialect> getHibernateDialectClass()
Specified by:
getHibernateDialectClass in interface Dialect
Returns:
the hibernate dialect class to be used

matchesJdbcURL

public boolean matchesJdbcURL(String jdbcConnectionURL)
Description copied from interface: Dialect
Used to autodetect a dialect for a given driver URL

Specified by:
matchesJdbcURL in interface Dialect
Parameters:
jdbcConnectionURL - a jdbc driver url such as jdbc:mysql://localhost:3306/sonar
Returns:
true if the dialect supports surch url

getDefaultDriverClassName

public String getDefaultDriverClassName()
Specified by:
getDefaultDriverClassName in interface Dialect

getConnectionInitStatement

public String getConnectionInitStatement(String schema)
Specified by:
getConnectionInitStatement in interface Dialect

getTrueSqlValue

public String getTrueSqlValue()
Specified by:
getTrueSqlValue in interface Dialect

getFalseSqlValue

public String getFalseSqlValue()
Specified by:
getFalseSqlValue in interface Dialect


Copyright © 2009-2012 SonarSource. All Rights Reserved.