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) |
protected void |
appendByteArrayType(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 |
appendLongStringType(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[] |
getDriverClassNames() |
boolean |
isCreateIfNotExistsSupported() |
boolean |
isCreateIndexIfNotExistsSupported() |
boolean |
isDatabaseUrlThisType(String url,
String dbTypePart) |
boolean |
isLimitDeleteAtEndSupported() |
boolean |
isLimitUpdateAtEndSupported() |
boolean |
isTruncateSupported() |
void |
setCreateTableSuffix(String createTableSuffix)
Set the string that is appended to the end of a CREATE TABLE statement.
|
addPrimaryKeySql, addUniqueComboSql, appendBigDecimalNumericType, appendByteType, appendCharType, appendColumnArg, appendCreateSchemaSuffix, appendDeleteLimitValue, appendDoubleType, appendEscapedEntityName, appendEscapedWord, appendFloatType, appendInsertNoColumns, appendIntegerType, appendLimitValue, appendLongType, appendOffsetValue, appendSelectNextValFromSequence, appendSerializableType, appendShortType, appendStringType, appendUpdateLimitValue, appendUuidNativeType, configureGeneratedIdSequence, configureId, downCaseString, dropColumnArg, extractDatabaseTableConfig, generatedIdSqlAtEnd, generateIdSequenceName, getCommentLinePrefix, getDataPersister, getFieldConverter, getPingStatement, isAllowGeneratedIdInsertSupported, isBatchUseTransaction, isCreateSchemaIfNotExistsSupported, isCreateSchemaReturnsNegative, isCreateSchemaReturnsZero, isCreateTableReturnsNegative, isCreateTableReturnsZero, isEntityNamesMustBeUpCase, isIdSequenceNeeded, isLimitAfterDeleteSupported, isLimitAfterSelect, isLimitAfterUpdateSupported, isLimitSqlSupported, isNestedSavePointsSupported, isOffsetLimitArgument, isOffsetSqlSupported, isSelectSequenceBeforeInsert, isSequenceNamesMustBeLowerCase, isVarcharFieldWidthSupported, loadDriver, setDriver, upCaseEntityName, upCaseString
public static final String DEFAULT_CREATE_TABLE_SUFFIX
setCreateTableSuffix(java.lang.String)
method.protected String[] getDriverClassNames()
getDriverClassNames
in class com.j256.ormlite.db.BaseDatabaseType
public 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.BaseDatabaseType
protected void appendBooleanType(StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, int fieldWidth)
appendBooleanType
in class com.j256.ormlite.db.BaseDatabaseType
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)
configureGeneratedId
in class com.j256.ormlite.db.BaseDatabaseType
public void appendCreateTableSuffix(StringBuilder sb)
appendCreateTableSuffix
in interface com.j256.ormlite.db.DatabaseType
appendCreateTableSuffix
in class com.j256.ormlite.db.BaseDatabaseType
public boolean isTruncateSupported()
isTruncateSupported
in interface com.j256.ormlite.db.DatabaseType
isTruncateSupported
in class com.j256.ormlite.db.BaseDatabaseType
public boolean isCreateIfNotExistsSupported()
isCreateIfNotExistsSupported
in interface com.j256.ormlite.db.DatabaseType
isCreateIfNotExistsSupported
in class com.j256.ormlite.db.BaseDatabaseType
public boolean isCreateIndexIfNotExistsSupported()
isCreateIndexIfNotExistsSupported
in interface com.j256.ormlite.db.DatabaseType
isCreateIndexIfNotExistsSupported
in class com.j256.ormlite.db.BaseDatabaseType
public boolean isLimitUpdateAtEndSupported()
isLimitUpdateAtEndSupported
in interface com.j256.ormlite.db.DatabaseType
isLimitUpdateAtEndSupported
in class com.j256.ormlite.db.BaseDatabaseType
public boolean isLimitDeleteAtEndSupported()
isLimitDeleteAtEndSupported
in interface com.j256.ormlite.db.DatabaseType
isLimitDeleteAtEndSupported
in class com.j256.ormlite.db.BaseDatabaseType
protected void appendByteArrayType(StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, int fieldWidth)
appendByteArrayType
in class com.j256.ormlite.db.BaseDatabaseType
protected void appendLongStringType(StringBuilder sb, com.j256.ormlite.field.FieldType fieldType, int fieldWidth)
appendLongStringType
in class com.j256.ormlite.db.BaseDatabaseType
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.