public class SdDbUtilMySqlImpl extends SdAbstractDbUtil
| 构造器和说明 |
|---|
SdDbUtilMySqlImpl(SdDatabaseOptions options)
初始化
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
createDatabase(SdAbstractDatabaseContent content)
创建数据库
|
boolean |
existDatabase(SdDatabaseOptions config,
String dbName)
数据库是否存在
|
boolean |
existDatabase(String dbName)
数据库是否存在
|
SdTableAttribute |
getTableAttribute(String tableName)
获取指定数据库,指定表的属性,如果不存在返回null
|
List<SdTableIndexKeyAttribute> |
getTableIndexKeysAttribute(String tableName,
boolean unique,
boolean approximate)
获取指定表的索引属性,如果不存在返回长度为0的集合
|
SdDbUtilMySqlImpl |
setConfig(SdDatabaseOptions config)
设置数据库配置文件
|
converterColumnsAttribute, converterIndexKeysAttribute, converterPortedKeysAttribute, converterPrimaryKeyAttribute, converterTableAttribute, createDatabase, createTable, deleteTable, existTable, getBaseUrlConfig, getConfig, getConnection, getConnection, getSdTable, getSdTable, getTableColumnsAttribute, getTableExportedKeysAttribute, getTableImportedKeysAttribute, getTableNames, getTablePrimaryKeyAttribute, updateDatabase, updateDatabase, updateTableinstancepublic SdDbUtilMySqlImpl(SdDatabaseOptions options)
config - public boolean existDatabase(String dbName) throws Exception
ScrewDriverDbUtilexistDatabase 在类中 SdAbstractDbUtildbName - 数据库名称Exceptionpublic boolean existDatabase(SdDatabaseOptions config, String dbName) throws Exception
ScrewDriverDbUtilexistDatabase 在类中 ScrewDriverDbUtilconfig - 数据库连接信息dbName - 数据库名称Exceptionpublic boolean createDatabase(SdAbstractDatabaseContent content) throws Exception
ScrewDriverDbUtilcreateDatabase 在类中 SdAbstractDbUtilcontent - 数据库创建的内容Exceptionpublic SdTableAttribute getTableAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTableAttribute 在类中 SdAbstractDbUtilExceptionpublic List<SdTableIndexKeyAttribute> getTableIndexKeysAttribute(String tableName, boolean unique, boolean approximate) throws Exception
ScrewDriverDbUtilgetTableIndexKeysAttribute 在类中 SdAbstractDbUtilunique - 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 SdDbUtilMySqlImpl setConfig(SdDatabaseOptions config)
SdAbstractDbUtilsetConfig 在类中 SdAbstractDbUtilCopyright © 2019 Mirren Tools. All rights reserved.