| | |
| | | package com.vci.ubcs.ddl.mapper; |
| | | |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.ResultType; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | /** |
| | | * Description: |
| | | * |
| | |
| | | */ |
| | | public interface DllMapper { |
| | | |
| | | int createViewBySql(String viewCreateSql); |
| | | @Update({"${viewCreateSql}"}) |
| | | int createViewBySql(@Param("viewCreateSql") String viewCreateSql); |
| | | |
| | | int createTableBySql(String tableName,String attributeSql); |
| | | @Update({"create table ${tableName} ( ${attributeSql} )"}) |
| | | int createTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | |
| | | int checkTableExist(String tableName); |
| | | @Update({"COMMENT ON TABLE ${tableName} IS '${comment}' "}) |
| | | int commentTable(@Param("tableName") String tableName, @Param("comment") String comment); |
| | | |
| | | int countAll(String tableName); |
| | | @Update({"COMMENT ON column ${tableName}.${columnName} IS '${comment}' "}) |
| | | int commentColumnTable(@Param("tableName") String tableName, @Param("columnName") String columnName, @Param("comment") String comment); |
| | | |
| | | int commentTable(String tableName, String comment); |
| | | @Update({"alter table ${tableName} modify ( ${attributeSql} ) "}) |
| | | int modifyTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | |
| | | int commentColumnTable(String tableName, String columnName, String comment); |
| | | @Update({"alter table ${tableName} add ( ${attributeSql} )"}) |
| | | int addColumn2TableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | |
| | | int modifyTableBySql(String tableName, String attributeSql); |
| | | @Update({"drop table if exists ${tableName}"}) |
| | | int dropTable(@Param("tableName") String tableName); |
| | | |
| | | int addColumn2TableBySql(String tableName, String attributeSql); |
| | | @Select({"select count(table_name) from user_tables where upper(table_name) = upper(#{tableName,jdbcType=VARCHAR})"}) |
| | | int checkTableExist(@Param("tableName") String tableName); |
| | | |
| | | int dropTable(String tableName); |
| | | @Select({"select count(*) from ${tableName}"}) |
| | | @ResultType(Integer.class) |
| | | int countAll(@Param("tableName") String tableName); |
| | | } |