接口 SqliteTablesMapper
public interface SqliteTablesMapper
创建更新表结构的Mapper
- 作者:
- don
-
方法概要
修饰符和类型方法说明queryBuildIndexSql(String tableName) 查询建表语句queryBuildTableSql(String tableName) 查询建表语句queryTableColumns(String tableName) 查询建表语句
-
方法详细资料
-
queryBuildTableSql
@Select("select `sql` from sqlite_master where type=\'table\' and name=#{tableName};") String queryBuildTableSql(String tableName) 查询建表语句- 参数:
tableName- 表名- 返回:
- 建表语句
-
queryBuildIndexSql
@Result(column="type",property="type") @Result(column="name",property="name") @Result(column="tbl_name",property="tblName") @Result(column="rootpage",property="rootpage") @Result(column="sql",property="sql") @Select("select * from sqlite_master where type=\'index\' and tbl_name=#{tableName};") List<SqliteMaster> queryBuildIndexSql(String tableName) 查询建表语句- 参数:
tableName- 表名- 返回:
- 建表语句
-
queryTableColumns
@Result(column="cid",property="cid") @Result(column="name",property="name") @Result(column="type",property="type") @Result(column="notnull",property="notnull") @Result(column="dflt_value",property="dfltValue") @Result(column="pk",property="pk") @Select("pragma table_info(\"${tableName}\");") List<SqliteColumns> queryTableColumns(String tableName) 查询建表语句- 参数:
tableName- 表名- 返回:
- 建表语句
-