类 MySQLDialect

java.lang.Object
cn.featherfly.common.db.dialect.AbstractDialect
cn.featherfly.common.db.dialect.MySQLDialect
所有已实现的接口:
Dialect

public class MySQLDialect
extends AbstractDialect

MySQL Dialect.

  • 构造器详细资料

    • MySQLDialect

      public MySQLDialect()
  • 方法详细资料

    • getPaginationSql

      public java.lang.String getPaginationSql​(java.lang.String sql, int start, int limit)

      转换普通sql为带分页的sql

      .
      参数:
      sql - 带转换的sql
      start - 起始数
      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 - 带转换的sql
      start - 起始数
      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 - 带转换的sql
      start - 起始数
      limit - 数量
      startSymbol - 命名参数的起始符号
      返回:
      返回转换好的分页sql
    • convertValueToSql

      public java.lang.String convertValueToSql​(java.lang.Object value, int sqlType)

      转换值为字符串

      .
      指定者:
      convertValueToSql 在类中 AbstractDialect
      参数:
      value - value
      sqlType - 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

      protected java.lang.String getAutoIncrement​(Column column)
      从类复制的说明: AbstractDialect
      Gets the identity.
      指定者:
      getAutoIncrement 在类中 AbstractDialect
      参数:
      column - the column
      返回:
      the identity
    • getColumnTypeName

      public java.lang.String getColumnTypeName​(java.sql.SQLType sqlType)
      从接口复制的说明: Dialect
      Gets 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
    • getInitSqlFooter

      public java.lang.String getInitSqlFooter()
      Gets the inits the sql footer.
      返回:
      the inits the sql footer
    • 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 schema
      tableName - the table name
      indexName - the index name
      ifExists - the if exists
      返回:
      the string