类 PostgreSQLDialect

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

public class PostgreSQLDialect
extends AbstractDialect

PostgreSQL Dialect.

  • 构造器详细资料

    • PostgreSQLDialect

      public PostgreSQLDialect()
      Instantiates a new postgre SQL dialect.
  • 方法详细资料

    • 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
    • getPaginationSqlParameter

      public java.lang.Object[] getPaginationSqlParameter​(java.lang.Object[] params, int start, int limit)

      返回分页参数的数组

      .
      指定者:
      getPaginationSqlParameter 在接口中 Dialect
      覆盖:
      getPaginationSqlParameter 在类中 AbstractDialect
      参数:
      params - 参数数组
      start - 起始数
      limit - 数量
      返回:
      分页参数的数组
    • 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
    • buildCreateTableDDL

      public java.lang.String buildCreateTableDDL​(Table table)
      Builds the create table sql.
      指定者:
      buildCreateTableDDL 在接口中 Dialect
      覆盖:
      buildCreateTableDDL 在类中 AbstractDialect
      参数:
      table - the table
      返回:
      the string
    • getTableComment

      protected java.lang.String getTableComment​(Table table)
      Gets the table comment.
      覆盖:
      getTableComment 在类中 AbstractDialect
      参数:
      table - the table
      返回:
      the table comment
    • getPrimaryKeyDDL

      protected java.lang.String getPrimaryKeyDDL​(Table table)
      Gets the primary key DDL.
      覆盖:
      getPrimaryKeyDDL 在类中 AbstractDialect
      参数:
      table - the table
      返回:
      the primary key DDL
    • getColumnDDL

      protected java.lang.String getColumnDDL​(Column column)
      Gets the column DDL.
      覆盖:
      getColumnDDL 在类中 AbstractDialect
      参数:
      column - the column
      返回:
      the column DDL
    • getColumnTypeName

      public java.lang.String getColumnTypeName​(java.sql.SQLType sqlType)
      Gets the column type name.
      参数:
      sqlType - the sql type
      返回:
      the column type name
    • getAutoIncrement

      protected java.lang.String getAutoIncrement​(Column column)
      Gets the identity.
      指定者:
      getAutoIncrement 在类中 AbstractDialect
      参数:
      column - the column
      返回:
      the identity
    • 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