Package com.heliorm.sql.mysql
Class MySqlDriver
- java.lang.Object
-
- com.heliorm.sql.SqlDriver
-
- com.heliorm.sql.mysql.MySqlDriver
-
public final class MySqlDriver extends SqlDriver
- Author:
- gideon
-
-
Constructor Summary
Constructors Constructor Description MySqlDriver()MySqlDriver(Map<Database,Database> aliases)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcastNull(Field field)protected StringfieldName(Table table, Field field)protected StringfieldType(Table<?> table, Field field)protected StringfullFieldName(Table table, Field field)protected StringfullTableName(Table table)protected ObjectgetKeyValueFromResultSet(ResultSet rs, Field field)Retrieve the returned key value from a result set (used for updating auto-increment keys).protected TableGeneratorgetTableGenerator()protected booleansupportsTransactions()protected booleansupportsUnionAll()protected StringvirtualFieldName(String name)protected StringvirtualValue(String name)-
Methods inherited from class com.heliorm.sql.SqlDriver
createTables, databaseName, setCreateTables, setEnum, setRollbackOnUncommittedClose, setUseUnionAll, tableName
-
-
-
-
Method Detail
-
fullTableName
protected String fullTableName(Table table) throws OrmException
- Specified by:
fullTableNamein classSqlDriver- Throws:
OrmException
-
fullFieldName
protected String fullFieldName(Table table, Field field) throws OrmException
- Specified by:
fullFieldNamein classSqlDriver- Throws:
OrmException
-
virtualFieldName
protected String virtualFieldName(String name)
- Specified by:
virtualFieldNamein classSqlDriver
-
virtualValue
protected String virtualValue(String name)
- Specified by:
virtualValuein classSqlDriver
-
getTableGenerator
protected TableGenerator getTableGenerator()
- Specified by:
getTableGeneratorin classSqlDriver
-
getKeyValueFromResultSet
protected Object getKeyValueFromResultSet(ResultSet rs, Field field) throws OrmException
Retrieve the returned key value from a result set (used for updating auto-increment keys).- Specified by:
getKeyValueFromResultSetin classSqlDriver- Parameters:
rs- The result setfield- The field for which we're reading data- Returns:
- The data
- Throws:
OrmException- Thrown if we cannot work out how to extract the data.
-
fieldType
protected String fieldType(Table<?> table, Field field) throws OrmException
- Specified by:
fieldTypein classSqlDriver- Throws:
OrmException
-
supportsUnionAll
protected boolean supportsUnionAll()
- Specified by:
supportsUnionAllin classSqlDriver
-
supportsTransactions
protected boolean supportsTransactions()
- Specified by:
supportsTransactionsin classSqlDriver
-
-