public class SdDbUtilSqlServerImpl extends SdAbstractDbUtil
| 构造器和说明 |
|---|
SdDbUtilSqlServerImpl(SdDatabaseOptions options)
初始化
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
existDatabase(SdDatabaseOptions config,
String dbName)
数据库是否存在
|
SdTableAttribute |
getTableAttribute(String tableName)
获取指定数据库,指定表的属性,如果不存在返回null
|
List<SdTableColumnAttribute> |
getTableColumnsAttribute(String tableName)
获取当前数据库中指定表的所有属性,如果不存在抛出异常
|
List<SdTableIndexKeyAttribute> |
getTableIndexKeysAttribute(String tableName,
boolean unique,
boolean approximate)
获取指定表的索引属性,如果不存在返回长度为0的集合
|
List<String> |
getTableNames()
获取当前数据库所有数据库表名,如果不存在返回长度为0的集合
|
converterColumnsAttribute, converterIndexKeysAttribute, converterPortedKeysAttribute, converterPrimaryKeyAttribute, converterTableAttribute, createDatabase, createDatabase, createTable, deleteTable, existDatabase, existTable, getBaseUrlConfig, getConfig, getConnection, getConnection, getSdTable, getSdTable, getTableExportedKeysAttribute, getTableImportedKeysAttribute, getTablePrimaryKeyAttribute, setConfig, updateDatabase, updateDatabase, updateTableinstancepublic SdDbUtilSqlServerImpl(SdDatabaseOptions options)
options - public boolean existDatabase(SdDatabaseOptions config, String dbName) throws Exception
ScrewDriverDbUtilexistDatabase 在类中 ScrewDriverDbUtilconfig - 数据库连接信息dbName - 数据库名称Exceptionpublic List<String> getTableNames() throws Exception
ScrewDriverDbUtilgetTableNames 在类中 SdAbstractDbUtilExceptionpublic SdTableAttribute getTableAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTableAttribute 在类中 SdAbstractDbUtilExceptionpublic List<SdTableColumnAttribute> getTableColumnsAttribute(String tableName) throws Exception
ScrewDriverDbUtilgetTableColumnsAttribute 在类中 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 beaccurateExceptionCopyright © 2019 Mirren Tools. All rights reserved.