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;
|
import org.springframework.stereotype.Repository;
|
|
/**
|
* Description:sqlLite的数据库操作类
|
*
|
* @author LiHang
|
* @date 2023/4/24
|
*/
|
@Repository
|
public interface DllSqlLiteMapper extends DllMapper {
|
@Update({"${viewCreateSql}"})
|
@ResultType(Integer.class)
|
@Override
|
int createViewBySql(@Param("viewCreateSql") String viewCreateSql);
|
|
@Update({"create table ${tableName} ( ${attributeSql} )"})
|
@ResultType(Integer.class)
|
@Override
|
int createTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql);
|
|
@Select({"select count(name) from sqlite_master where upper(name) = upper(#{tableName,jdbcType=VARCHAR})"})
|
@ResultType(Integer.class)
|
@Override
|
int checkTableExist(@Param("tableName") String tableName);
|
|
@Select({"select count(*) from ${tableName}"})
|
@ResultType(Integer.class)
|
@Override
|
int countAll(@Param("tableName") String tableName);
|
|
@Select({"drop table ${tableName}"})
|
@ResultType(Integer.class)
|
@Override
|
int dropTable(String tableName);
|
}
|