public abstract class SdAbstractDbUtil extends ScrewDriverDbUtil
| 构造器和说明 |
|---|
SdAbstractDbUtil(SdDatabaseOptions config)
初始化一个默认的数据库管理实现类
|
existDatabase, instancepublic SdAbstractDbUtil(SdDatabaseOptions config)
public SdDatabaseOptions getBaseUrlConfig()
public Connection getConnection() throws Exception
ScrewDriverDbUtilgetConnection 在类中 ScrewDriverDbUtilExceptionpublic Connection getConnection(SdDatabaseOptions config) throws Exception
ScrewDriverDbUtilgetConnection 在类中 ScrewDriverDbUtilExceptionpublic boolean execute(String sql) throws Exception
ScrewDriverDbUtilexecute 在类中 ScrewDriverDbUtilExceptionpublic boolean createDatabase(SdAbstractDatabaseContent content) throws Exception
ScrewDriverDbUtilcreateDatabase 在类中 ScrewDriverDbUtilcontent - 数据库创建的内容Exceptionpublic boolean createDatabase(SdDatabaseOptions config, SdAbstractDatabaseContent content) throws Exception
ScrewDriverDbUtilcreateDatabase 在类中 ScrewDriverDbUtilconfig - 数据库连接信息content - 数据库创建的内容Exceptionpublic boolean createDatabase(String sql) throws Exception
ScrewDriverDbUtilcreateDatabase 在类中 ScrewDriverDbUtilsql - 数据库创建的语句Exceptionpublic boolean createDatabase(SdDatabaseOptions config, String sql) throws Exception
ScrewDriverDbUtilcreateDatabase 在类中 ScrewDriverDbUtilconfig - 数据库连接信息sql - 数据库创建的SQLExceptionpublic boolean updateDatabase(SdAbstractDatabaseContent content) throws Exception
ScrewDriverDbUtilupdateDatabase 在类中 ScrewDriverDbUtilcontent - 数据库修改的内容Exceptionpublic boolean updateDatabase(SdDatabaseOptions config, SdAbstractDatabaseContent content) throws Exception
ScrewDriverDbUtilupdateDatabase 在类中 ScrewDriverDbUtilconfig - 数据库连接信息content - 数据库修改的内容Exceptionpublic boolean updateDatabase(String sql) throws Exception
ScrewDriverDbUtilupdateDatabase 在类中 ScrewDriverDbUtilsql - 修改数据库的语句Exceptionpublic boolean updateDatabase(SdDatabaseOptions config, String sql) throws Exception
ScrewDriverDbUtilupdateDatabase 在类中 ScrewDriverDbUtilconfig - 数据库连接信息sql - 数据库修改的SQLExceptionpublic boolean createTable(SdAbstractTableContent content) throws Exception
ScrewDriverDbUtilcreateTable 在类中 ScrewDriverDbUtilExceptionpublic boolean createTable(String sql) throws Exception
ScrewDriverDbUtilcreateTable 在类中 ScrewDriverDbUtilsql - 创建表的语句Exceptionpublic boolean updateTable(SdAbstractTableContent content) throws Exception
ScrewDriverDbUtilupdateTable 在类中 ScrewDriverDbUtilExceptionpublic boolean updateTable(String sql) throws Exception
ScrewDriverDbUtilupdateTable 在类中 ScrewDriverDbUtilsql - 修改表的SQL语句Exceptionpublic boolean deleteTable(SdAbstractTableContent content) throws Exception
ScrewDriverDbUtildeleteTable 在类中 ScrewDriverDbUtilExceptionpublic boolean deleteTable(String sql) throws Exception
ScrewDriverDbUtildeleteTable 在类中 ScrewDriverDbUtilsql - 删除表的语句Exceptionpublic boolean existDatabase(String dbName) throws Exception
ScrewDriverDbUtilexistDatabase 在类中 ScrewDriverDbUtildbName - 数据库名称Exceptionpublic boolean existTable(String tableName) throws Exception
ScrewDriverDbUtilexistTable 在类中 ScrewDriverDbUtilExceptionpublic SdTable getSdTable(String tableName) throws Exception
ScrewDriverDbUtilgetSdTable 在类中 ScrewDriverDbUtilExceptionpublic SdTable getSdTable(String tableName, boolean unique, boolean approximate) throws Exception
ScrewDriverDbUtilgetSdTable 在类中 ScrewDriverDbUtiltableName - 表的名字unique - when true, return only indices for unique values;
when false, return indices regardless of whether unique or not (get index info)approximate - when true, result is allowed to reflect approximateor out of data values;
when false, results are requested to beaccurate (get index info )Exceptionpublic List<String> getTableNames() throws Exception
ScrewDriverDbUtilgetTableNames 在类中 ScrewDriverDbUtilExceptionpublic SdTableAttribute getTableAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTableAttribute 在类中 ScrewDriverDbUtilExceptionpublic List<SdTableColumnAttribute> getTableColumnsAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTableColumnsAttribute 在类中 ScrewDriverDbUtilExceptionpublic SdTablePrimaryKeyAttribute getTablePrimaryKeyAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTablePrimaryKeyAttribute 在类中 ScrewDriverDbUtilExceptionpublic List<SdTableIndexKeyAttribute> getTableIndexKeysAttribute(String tableName, boolean unique, boolean approximate) throws Exception
ScrewDriverDbUtilgetTableIndexKeysAttribute 在类中 ScrewDriverDbUtilunique - when true, return only indices for unique values;
when false, return indices regardless of whether unique or notapproximate - when true, result is allowed to reflect approximateor out of data values;
when false, results are requested to beaccurateExceptionpublic List<SdTablePortedKeysAttribute> getTableExportedKeysAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTableExportedKeysAttribute 在类中 ScrewDriverDbUtilExceptionpublic List<SdTablePortedKeysAttribute> getTableImportedKeysAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTableImportedKeysAttribute 在类中 ScrewDriverDbUtilExceptionpublic void converterTableAttribute(ResultSet rs, SdTableAttribute result) throws SQLException
rs - result - SQLExceptionpublic void converterColumnsAttribute(ResultSet rs, SdTableColumnAttribute result) throws SQLException
rs - result - SQLExceptionpublic void converterPrimaryKeyAttribute(ResultSet rs, SdTablePrimaryKeyAttribute result) throws SQLException
rs - result - SQLExceptionpublic void converterIndexKeysAttribute(ResultSet rs, SdTableIndexKeyAttribute result) throws SQLException
rs - result - SQLExceptionpublic void converterPortedKeysAttribute(ResultSet rs, SdTablePortedKeysAttribute result) throws SQLException
rs - result - SQLExceptionpublic SdDatabaseOptions getConfig()
public SdAbstractDbUtil setConfig(SdDatabaseOptions config)
config - Copyright © 2021 Mirren Tools. All rights reserved.