com.centit.support.database.metadata.DatabaseMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of centit-database Show documentation
Show all versions of centit-database Show documentation
数据库操作通用方法和函数,从以前的util包中分离出来,并且整合了部分sys-module中的函数
The newest version!
package com.centit.support.database.metadata;
import com.centit.support.database.utils.DBType;
import java.sql.Connection;
import java.sql.SQLException;
@SuppressWarnings("unused")
public interface DatabaseMetadata {
static DatabaseMetadata createDatabaseMetadata(final DBType dbtype)
throws SQLException {
switch (dbtype) {
case Oracle:
case DM:
case KingBase:
case Oscar:
return new OracleMetadata();
case DB2:
return new DB2Metadata();
case SqlServer:
return new SqlSvrMetadata();
case PostgreSql:
case MySql:
case Access:
case H2:
case GBase:
default:
return new JdbcMetadata();
}
}
void setDBConfig(Connection dbc);
SimpleTableInfo getTableMetadata(String tabName);
String getDBSchema();
void setDBSchema(String schema);
}