类 MySQLDialect
java.lang.Object
cn.featherfly.common.db.dialect.AbstractDialect
cn.featherfly.common.db.dialect.MySQLDialect
- 所有已实现的接口:
Dialect
public class MySQLDialect extends AbstractDialect
MySQL Dialect.
-
嵌套类概要
从接口继承的嵌套类/接口 cn.featherfly.common.db.dialect.Dialect
Dialect.Keyworld -
字段概要
从类继承的字段 cn.featherfly.common.db.dialect.AbstractDialect
logger, UPDATE_STRING从接口继承的字段 cn.featherfly.common.db.dialect.Dialect
DEFAULT_LIMIT, LIMIT_PARAM_NAME, PARAM_NAME_START_SYMBOL, PRIMARY_KEY_INDEX_NAME, START_PARAM_NAME -
构造器概要
构造器 构造器 说明 MySQLDialect() -
方法概要
修饰符和类型 方法 说明 java.lang.StringbuildDropIndexDDL(java.lang.String schema, java.lang.String tableName, java.lang.String indexName, boolean ifExists)Builds the drop index sql.java.lang.StringconvertValueToSql(java.lang.Object value, int sqlType)转换值为字符串protected java.lang.StringgetAutoIncrement(Column column)Gets the identity.java.lang.StringgetColumnTypeName(java.sql.SQLType sqlType)Gets the column type name.java.lang.StringgetDefaultSchema(java.lang.String catalog)Gets the default schema.java.lang.StringgetFkCheck(boolean check)java.lang.StringgetInitSqlFooter()Gets the inits the sql footer.java.lang.StringgetInitSqlHeader()Gets the inits the sql header.java.lang.StringgetPaginationSql(java.lang.String sql, int start, int limit)转换普通sql为带分页的sqljava.lang.StringgetParamNamedPaginationSql(java.lang.String sql, int start, int limit)转换普通命名sql为带分页的sql,此sql为带命名参数sql, 如select * from user where user_name = :usernamejava.lang.StringgetParamNamedPaginationSql(java.lang.String sql, int start, int limit, char startSymbol)转换普通命名sql为带分页的sql,此sql为带命名参数sql, 如select * from user where user_name = {startSymal}username.java.lang.StringgetWrapSign()Gets the wrap sign.java.lang.StringwrapName(java.lang.String name)包装名称,避免关键字问题从类继承的方法 cn.featherfly.common.db.dialect.AbstractDialect
buildAddColumnDDL, buildAlterTableAddColumnDDL, buildAlterTableDDL, buildAlterTableDropColumnDDL, buildAlterTableDropColumnDDL, buildAlterTableModifyColumnDDL, buildCreateTableDDL, buildDropColumnDDL, buildDropColumnDDL, buildModifyColumnDDL, getColumnComment, getColumnDDL, getColumnNotNull, getColumnTypeDDL, getColumnTypeDDL, getDefaultValue, getKeywords, getPaginationSqlParameter, getPaginationSqlParameter, getPrimaryKeyDDL, getTableColumnsDDL, getTableComment, isForUpdate, isKeywordsUppercase, isTableAndColumnNameUppercase, setKeywordsUppercase, setTableAndColumnNameUppercase, valueToSql从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.featherfly.common.db.dialect.Dialect
buildAlterTableAddColumnDDL, buildAlterTableDDL, buildAlterTableDDL, buildAlterTableDropColumnDDL, buildAlterTableDropColumnDDL, buildAlterTableModifyColumnDDL, buildColumnSql, buildColumnSql, buildColumnSql, buildColumnSql, buildColumnSql, buildColumnSql, buildColumnSql, buildCreateDataBaseDDL, buildCreateIndexDDL, buildCreateIndexDDL, buildCreateIndexDDL, buildCreateIndexDDL, buildCreateSchemaDDL, buildDropDataBaseDDL, buildDropDataBaseDDL, buildDropDDL, buildDropIndexDDL, buildDropIndexDDL, buildDropIndexDDL, buildDropSchemaDDL, buildDropSchemaDDL, buildDropTableDDL, buildDropTableDDL, buildDropTableDDL, buildDropTableDDL, buildDropTableDDL, buildDropViewDDL, buildDropViewDDL, buildDropViewDDL, buildInsertBatchSql, buildTableSql, buildTableSql, buildTableSql, convertTableOrColumnName, getDefaultSize, getFunction, getKeyword, getKeyword, getKeyword, getPrimaryKeyIndexName, isAutoGenerateKeyBatch, isInsertBatch
-
构造器详细资料
-
MySQLDialect
public MySQLDialect()
-
-
方法详细资料
-
getPaginationSql
public java.lang.String getPaginationSql(java.lang.String sql, int start, int limit)转换普通sql为带分页的sql
.- 参数:
sql- 带转换的sqlstart- 起始数limit- 数量- 返回:
- 返回转换好的分页sql
-
getParamNamedPaginationSql
public java.lang.String getParamNamedPaginationSql(java.lang.String sql, int start, int limit)转换普通命名sql为带分页的sql,此sql为带命名参数sql, 如select * from user where user_name = :username
.- 参数:
sql- 带转换的sqlstart- 起始数limit- 数量- 返回:
- 返回转换好的分页sql
-
getParamNamedPaginationSql
public java.lang.String getParamNamedPaginationSql(java.lang.String sql, int start, int limit, char startSymbol)转换普通命名sql为带分页的sql,此sql为带命名参数sql, 如select * from user where user_name = {startSymal}username.
.- 参数:
sql- 带转换的sqlstart- 起始数limit- 数量startSymbol- 命名参数的起始符号- 返回:
- 返回转换好的分页sql
-
convertValueToSql
public java.lang.String convertValueToSql(java.lang.Object value, int sqlType)转换值为字符串
.- 指定者:
convertValueToSql在类中AbstractDialect- 参数:
value- valuesqlType- sqlType- 返回:
- 字符串
-
wrapName
public java.lang.String wrapName(java.lang.String name)包装名称,避免关键字问题
.- 参数:
name- 名称(列明,表名等)- 返回:
- 包装后的名称
-
getWrapSign
public java.lang.String getWrapSign()Gets the wrap sign.- 返回:
- the wrap sign
-
getFkCheck
public java.lang.String getFkCheck(boolean check) -
getAutoIncrement
从类复制的说明:AbstractDialectGets the identity.- 指定者:
getAutoIncrement在类中AbstractDialect- 参数:
column- the column- 返回:
- the identity
-
getColumnTypeName
public java.lang.String getColumnTypeName(java.sql.SQLType sqlType)从接口复制的说明:DialectGets the column type name.- 参数:
sqlType- the sql type- 返回:
- the column type name
-
getInitSqlHeader
public java.lang.String getInitSqlHeader()Gets the inits the sql header.- 返回:
- the inits the sql header
-
getDefaultSchema
public java.lang.String getDefaultSchema(java.lang.String catalog)Gets the default schema.- 参数:
catalog- the catalog- 返回:
- the default schema
-
buildDropIndexDDL
public java.lang.String buildDropIndexDDL(java.lang.String schema, java.lang.String tableName, java.lang.String indexName, boolean ifExists)Builds the drop index sql.- 参数:
schema- the schematableName- the table nameindexName- the index nameifExists- the if exists- 返回:
- the string
-