All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.centit.support.database.metadata.DatabaseMetadata Maven / Gradle / Ivy

Go to download

数据库操作通用方法和函数,从以前的util包中分离出来,并且整合了部分sys-module中的函数

There is a newer version: 5.3.2302
Show 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 {
    void setDBConfig(Connection dbc);
    SimpleTableInfo getTableMetadata(String tabName);
    String getDBSchema();
    void setDBSchema(String schema);

    static DatabaseMetadata createDatabaseMetadata(final DBType dbtype)
            throws SQLException {
        switch (dbtype){
            case Oracle:
                return new OracleMetadata();
            case DB2:
                return new DB2Metadata();
            case SqlServer:
                return new SqlSvrMetadata();
            case MySql:
            case Access:
            case H2:
            default:
                return new JdbcMetadata();
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy