public class MysqlDatabaseType
extends com.j256.ormlite.db.BaseDatabaseType
NOTE: By default the tables are created with the ENGINE=InnoDB suffix (see
DEFAULT_CREATE_TABLE_SUFFIX. Use setCreateTableSuffix(java.lang.String) to change that to "" to use the default
MyISAM storage engine, to choose another engine, or set other settings. For more information about engines, see the
'SHOW ENGINES;' results from the MySQL command line tool.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CREATE_TABLE_SUFFIX
Default suffix to the CREATE TABLE statement.
|
| Constructor and Description |
|---|
MysqlDatabaseType() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendBooleanType(StringBuilder sb,
com.j256.ormlite.field.FieldType fieldType,
int fieldWidth) |
void |
appendCreateTableSuffix(StringBuilder sb) |
protected void |
appendDateType(StringBuilder sb,
com.j256.ormlite.field.FieldType fieldType,
int fieldWidth) |
protected void |
configureGeneratedId(String tableName,
StringBuilder sb,
com.j256.ormlite.field.FieldType fieldType,
List<String> statementsBefore,
List<String> statementsAfter,
List<String> additionalArgs,
List<String> queriesAfter) |
String |
getDatabaseName() |
protected String |
getDriverClassName() |
boolean |
isCreateIfNotExistsSupported() |
boolean |
isCreateIndexIfNotExistsSupported() |
boolean |
isDatabaseUrlThisType(String url,
String dbTypePart) |
boolean |
isTruncateSupported() |
void |
setCreateTableSuffix(String createTableSuffix)
Set the string that is appended to the end of a CREATE TABLE statement.
|
addPrimaryKeySql, addUniqueComboSql, appendBigDecimalNumericType, appendByteArrayType, appendByteType, appendCharType, appendColumnArg, appendEscapedEntityName, appendEscapedWord, appendInsertNoColumns, appendLimitValue, appendLongStringType, appendLongType, appendOffsetValue, appendSelectNextValFromSequence, appendSerializableType, appendShortType, appendStringType, appendUuidNativeType, configureGeneratedIdSequence, configureId, downCaseString, dropColumnArg, extractDatabaseTableConfig, generatedIdSqlAtEnd, generateIdSequenceName, getCommentLinePrefix, getDataPersister, getFieldConverter, getPingStatement, isAllowGeneratedIdInsertSupported, isBatchUseTransaction, isCreateTableReturnsNegative, isCreateTableReturnsZero, isEntityNamesMustBeUpCase, isIdSequenceNeeded, isLimitAfterSelect, isLimitSqlSupported, isNestedSavePointsSupported, isOffsetLimitArgument, isOffsetSqlSupported, isSelectSequenceBeforeInsert, isVarcharFieldWidthSupported, loadDriver, setDriver, upCaseEntityName, upCaseStringpublic static final String DEFAULT_CREATE_TABLE_SUFFIX
setCreateTableSuffix(java.lang.String) method.protected String getDriverClassName()
getDriverClassName in class com.j256.ormlite.db.BaseDatabaseTypepublic String getDatabaseName()
public void setCreateTableSuffix(String createTableSuffix)
protected void appendDateType(StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, int fieldWidth)
appendDateType in class com.j256.ormlite.db.BaseDatabaseTypeprotected void appendBooleanType(StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, int fieldWidth)
appendBooleanType in class com.j256.ormlite.db.BaseDatabaseTypeprotected void configureGeneratedId(String tableName, StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter)
configureGeneratedId in class com.j256.ormlite.db.BaseDatabaseTypepublic void appendCreateTableSuffix(StringBuilder sb)
appendCreateTableSuffix in interface com.j256.ormlite.db.DatabaseTypeappendCreateTableSuffix in class com.j256.ormlite.db.BaseDatabaseTypepublic boolean isTruncateSupported()
isTruncateSupported in interface com.j256.ormlite.db.DatabaseTypeisTruncateSupported in class com.j256.ormlite.db.BaseDatabaseTypepublic boolean isCreateIfNotExistsSupported()
isCreateIfNotExistsSupported in interface com.j256.ormlite.db.DatabaseTypeisCreateIfNotExistsSupported in class com.j256.ormlite.db.BaseDatabaseTypepublic boolean isCreateIndexIfNotExistsSupported()
isCreateIndexIfNotExistsSupported in interface com.j256.ormlite.db.DatabaseTypeisCreateIndexIfNotExistsSupported in class com.j256.ormlite.db.BaseDatabaseTypeThis documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.