Search in sources :

Example 1 with DB2Parameter

use of org.jkiss.dbeaver.ext.db2.info.DB2Parameter in project dbeaver by serge-rider.

the class DB2Utils method readDBMCfg.

public static List<DB2Parameter> readDBMCfg(DBRProgressMonitor monitor, JDBCSession session) throws SQLException {
    LOG.debug("readDBMCfg");
    List<DB2Parameter> listDBMParameters = new ArrayList<>();
    try (JDBCPreparedStatement dbStat = session.prepareStatement(SEL_DBMCFG)) {
        try (JDBCResultSet dbResult = dbStat.executeQuery()) {
            while (dbResult.next()) {
                listDBMParameters.add(new DB2Parameter((DB2DataSource) session.getDataSource(), dbResult));
            }
        }
    }
    return listDBMParameters;
}
Also used : JDBCPreparedStatement(org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement) JDBCResultSet(org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet) DB2DataSource(org.jkiss.dbeaver.ext.db2.model.DB2DataSource) ArrayList(java.util.ArrayList) DB2Parameter(org.jkiss.dbeaver.ext.db2.info.DB2Parameter)

Example 2 with DB2Parameter

use of org.jkiss.dbeaver.ext.db2.info.DB2Parameter in project dbeaver by serge-rider.

the class DB2Utils method readDBCfg.

public static List<DB2Parameter> readDBCfg(DBRProgressMonitor monitor, JDBCSession session) throws SQLException {
    LOG.debug("readDBCfg");
    List<DB2Parameter> listDBParameters = new ArrayList<>();
    try (JDBCPreparedStatement dbStat = session.prepareStatement(SEL_DBCFG)) {
        try (JDBCResultSet dbResult = dbStat.executeQuery()) {
            while (dbResult.next()) {
                listDBParameters.add(new DB2Parameter((DB2DataSource) session.getDataSource(), dbResult));
            }
        }
    }
    return listDBParameters;
}
Also used : JDBCPreparedStatement(org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement) JDBCResultSet(org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet) DB2DataSource(org.jkiss.dbeaver.ext.db2.model.DB2DataSource) ArrayList(java.util.ArrayList) DB2Parameter(org.jkiss.dbeaver.ext.db2.info.DB2Parameter)

Aggregations

ArrayList (java.util.ArrayList)2 DB2Parameter (org.jkiss.dbeaver.ext.db2.info.DB2Parameter)2 DB2DataSource (org.jkiss.dbeaver.ext.db2.model.DB2DataSource)2 JDBCPreparedStatement (org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement)2 JDBCResultSet (org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet)2