类 SQLiteDialect

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

public class SQLiteDialect
extends AbstractDialect

SQLite Dialect

.
  • 字段详细资料

    • TEXT_TYPE

      public static final java.lang.String TEXT_TYPE
      The Constant TEXT_TYPE.
      另请参阅:
      常量字段值
  • 构造器详细资料

    • SQLiteDialect

      public SQLiteDialect()
      Instantiates a new SQ lite 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
    • 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
    • getTableColumnsDDL

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

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

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

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

      protected java.lang.String getAutoIncrement​(Column column)
      Gets the identity.
      指定者:
      getAutoIncrement 在类中 AbstractDialect
      参数:
      column - the column
      返回:
      the identity
    • getColumnTypeDDL

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

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

      public java.lang.String buildInsertBatchSql​(java.lang.String tableName, java.lang.String[] columnNames, int insertAmount)
      dialect for database supports batch insert.
      参数:
      tableName - the table name
      columnNames - the column names
      insertAmount - the insert amount
      返回:
      the string
    • isAutoGenerateKeyBatch

      public boolean isAutoGenerateKeyBatch()
      Checks if is auto generate key batch.
      返回:
      true, if is auto generate key batch
    • buildAlterTableAddColumnDDL

      public java.lang.String buildAlterTableAddColumnDDL​(java.lang.String schema, java.lang.String tableName, Column... columns)
      Builds the alter table add column DDL.
      指定者:
      buildAlterTableAddColumnDDL 在接口中 Dialect
      覆盖:
      buildAlterTableAddColumnDDL 在类中 AbstractDialect
      参数:
      schema - the database name
      tableName - the table name
      columns - the columns
      返回:
      the string
    • buildAlterTableDropColumnDDL

      public java.lang.String buildAlterTableDropColumnDDL​(java.lang.String schema, java.lang.String tableName, java.lang.String... columnNames)
      Builds the alter table drop column DDL.
      指定者:
      buildAlterTableDropColumnDDL 在接口中 Dialect
      覆盖:
      buildAlterTableDropColumnDDL 在类中 AbstractDialect
      参数:
      schema - the database name
      tableName - the table name
      columnNames - the column names
      返回:
      the string
    • buildAlterTableDropColumnDDL

      public java.lang.String buildAlterTableDropColumnDDL​(java.lang.String schema, java.lang.String tableName, Column... columns)
      Builds the alter table drop column DDL.
      指定者:
      buildAlterTableDropColumnDDL 在接口中 Dialect
      覆盖:
      buildAlterTableDropColumnDDL 在类中 AbstractDialect
      参数:
      schema - the database name
      tableName - the table name
      columns - the columns
      返回:
      the string
    • buildAlterTableModifyColumnDDL

      public java.lang.String buildAlterTableModifyColumnDDL​(java.lang.String schema, java.lang.String tableName, Column... columns)
      Builds the alter table modify column DDL.
      指定者:
      buildAlterTableModifyColumnDDL 在接口中 Dialect
      覆盖:
      buildAlterTableModifyColumnDDL 在类中 AbstractDialect
      参数:
      schema - the database name
      tableName - the table name
      columns - the columns
      返回:
      the string
    • 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