ITableInfoService.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. package com.customer.service;
  2. import com.customer.pojo.TableInfo;
  3. import com.customer.vo.TableInfoVO;
  4. import org.apache.ibatis.annotations.Param;
  5. import java.sql.SQLException;
  6. import java.util.List;
  7. import java.util.Map;
  8. public interface ITableInfoService {
  9. //---------------------------------mysql------------------------------------------
  10. /**
  11. * 创建mysql数据库和表
  12. */
  13. void createMysqlDataBase(Map<String,Object> map);
  14. /**
  15. * 查询mysql数据库是否存在
  16. */
  17. int mysqlDataBaseExist(String dataBaseName);
  18. /**
  19. * 查询数据库表是否存在
  20. */
  21. int mysqlTableExist(String dataBaseName,String tableName);
  22. /**
  23. * 查询数据库中的表信息
  24. */
  25. List<TableInfoVO> tableInfoList();
  26. /**
  27. * 查询表中有没有数据
  28. */
  29. int selectDataCount(String tableName);
  30. /**
  31. * 删除表
  32. */
  33. void dropMysqlTable(String tableName);
  34. /**
  35. * 获取表字段信息
  36. */
  37. List<TableInfo> mysqlTableFieldInfo(String dataBaseName, String tableName);
  38. /**
  39. * 修改mysql数据表
  40. */
  41. void updateMysqlTable(Map<String,Object> map);
  42. //---------------------------------sqlServer------------------------------------------
  43. /**
  44. * 创建salServer数据库和表
  45. */
  46. void createSqlServerDataBase(Map<String,Object> map);
  47. /**
  48. * 查询数据库表是否存在
  49. */
  50. int sqlServerTableExist(String dataBaseName,String tableName);
  51. // /**
  52. // * 获取当前库中所有表信息
  53. // */
  54. // List<TableInfoVO> sqlServerTableInfoList();
  55. /**
  56. * 查询表中是否有数据
  57. */
  58. int selectSqlServerDataCount(String tableName);
  59. /**
  60. * 删除当前库中表
  61. */
  62. void dropSqlserverTable(String tableName);
  63. /**
  64. * 修改sqlserver数据表
  65. */
  66. void updateSqlserverTable(Map<String, Object> map);
  67. // /**
  68. // * 根据数据库名称获取当前数据源所有表info
  69. // */
  70. // List<Map<String,Object>> getDataBasesInfo(@Param("DBname") String DBname);
  71. //---------------------------------DM------------------------------------------
  72. /**
  73. * 查询数据库表是否存在
  74. */
  75. int dmTableExist(String dataBaseName,String tableName);
  76. /**
  77. * 创建dm数据库和表
  78. */
  79. void createDmDataBase(Map<String,Object> map);
  80. //---------------------------------oracle------------------------------------------
  81. /**
  82. * 判断当前用户下表是否存在
  83. */
  84. int oracleTableExist(String tableName);
  85. /**
  86. * 创建oracle表
  87. */
  88. void createOracleTable(Map<String,Object> map);
  89. }