类 SQLiteDialect
java.lang.Object
cn.featherfly.common.db.dialect.AbstractDialect
cn.featherfly.common.db.dialect.SQLiteDialect
- 所有已实现的接口:
Dialect
public class SQLiteDialect extends AbstractDialect
SQLite Dialect
.-
嵌套类概要
从接口继承的嵌套类/接口 cn.featherfly.common.db.dialect.Dialect
Dialect.Keyworld -
字段概要
字段 修饰符和类型 字段 说明 static java.lang.StringTEXT_TYPEThe Constant TEXT_TYPE.从类继承的字段 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 -
构造器概要
构造器 构造器 说明 SQLiteDialect()Instantiates a new SQ lite dialect. -
方法概要
修饰符和类型 方法 说明 java.lang.StringbuildAlterTableAddColumnDDL(java.lang.String schema, java.lang.String tableName, Column... columns)Builds the alter table add column DDL.java.lang.StringbuildAlterTableDropColumnDDL(java.lang.String schema, java.lang.String tableName, Column... columns)Builds the alter table drop column DDL.java.lang.StringbuildAlterTableDropColumnDDL(java.lang.String schema, java.lang.String tableName, java.lang.String... columnNames)Builds the alter table drop column DDL.java.lang.StringbuildAlterTableModifyColumnDDL(java.lang.String schema, java.lang.String tableName, Column... columns)Builds the alter table modify column DDL.java.lang.StringbuildInsertBatchSql(java.lang.String tableName, java.lang.String[] columnNames, int insertAmount)dialect for database supports batch insert.java.lang.StringconvertValueToSql(java.lang.Object value, int sqlType)转换值为字符串protected java.lang.StringgetAutoIncrement(Column column)Gets the identity.protected java.lang.StringgetColumnComment(Column column)Gets the column comment.protected java.lang.StringgetColumnDDL(Column column)Gets the column DDL.protected java.lang.StringgetColumnTypeDDL(Column column, java.lang.String extra)Gets the column type DDL.java.lang.StringgetColumnTypeName(java.sql.SQLType sqlType)Gets the column type name.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.protected java.lang.StringgetTableColumnsDDL(Table table)Gets the table columns DDL.protected java.lang.StringgetTableComment(Table table)Gets the table comment.java.lang.StringgetWrapSign()Gets the wrap sign.booleanisAutoGenerateKeyBatch()Checks if is auto generate key batch.java.lang.StringwrapName(java.lang.String name)包装名称,避免关键字问题从类继承的方法 cn.featherfly.common.db.dialect.AbstractDialect
buildAddColumnDDL, buildAlterTableDDL, buildCreateTableDDL, buildDropColumnDDL, buildDropColumnDDL, buildModifyColumnDDL, getColumnNotNull, getColumnTypeDDL, getDefaultValue, getKeywords, getPaginationSqlParameter, getPaginationSqlParameter, getPrimaryKeyDDL, 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, buildDropIndexDDL, buildDropSchemaDDL, buildDropSchemaDDL, buildDropTableDDL, buildDropTableDDL, buildDropTableDDL, buildDropTableDDL, buildDropTableDDL, buildDropViewDDL, buildDropViewDDL, buildDropViewDDL, buildTableSql, buildTableSql, buildTableSql, convertTableOrColumnName, getDefaultSchema, getDefaultSize, getFunction, getKeyword, getKeyword, getKeyword, getPrimaryKeyIndexName, isInsertBatch
-
字段详细资料
-
TEXT_TYPE
public static final java.lang.String TEXT_TYPEThe 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- 带转换的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
-
getTableColumnsDDL
Gets the table columns DDL.- 覆盖:
getTableColumnsDDL在类中AbstractDialect- 参数:
table- the table- 返回:
- the table columns DDL
-
getTableComment
Gets the table comment.- 覆盖:
getTableComment在类中AbstractDialect- 参数:
table- the table- 返回:
- the table comment
-
getColumnComment
Gets the column comment.- 覆盖:
getColumnComment在类中AbstractDialect- 参数:
column- the column- 返回:
- the column comment
-
getColumnDDL
Gets the column DDL.- 覆盖:
getColumnDDL在类中AbstractDialect- 参数:
column- the column- 返回:
- the column DDL
-
getAutoIncrement
Gets the identity.- 指定者:
getAutoIncrement在类中AbstractDialect- 参数:
column- the column- 返回:
- the identity
-
getColumnTypeDDL
Gets the column type DDL.- 覆盖:
getColumnTypeDDL在类中AbstractDialect- 参数:
column- the columnextra- 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 namecolumnNames- the column namesinsertAmount- 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 nametableName- the table namecolumns- 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 nametableName- the table namecolumnNames- 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 nametableName- the table namecolumns- 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 nametableName- the table namecolumns- the columns- 返回:
- the string
-
getInitSqlHeader
public java.lang.String getInitSqlHeader()Gets the inits the sql header.- 返回:
- the inits the sql header
-