Search in sources :

Example 11 with DB2DataSource

use of org.jkiss.dbeaver.ext.db2.model.DB2DataSource 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

DB2DataSource (org.jkiss.dbeaver.ext.db2.model.DB2DataSource)7 JDBCPreparedStatement (org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement)5 DB2XMLString (org.jkiss.dbeaver.ext.db2.info.DB2XMLString)4 JDBCResultSet (org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet)4 ArrayList (java.util.ArrayList)3 DBException (org.jkiss.dbeaver.DBException)2 DB2Parameter (org.jkiss.dbeaver.ext.db2.info.DB2Parameter)2 DB2Schema (org.jkiss.dbeaver.ext.db2.model.DB2Schema)2 JDBCSession (org.jkiss.dbeaver.model.exec.jdbc.JDBCSession)2 Clob (java.sql.Clob)1 SQLException (java.sql.SQLException)1 IContributionManager (org.eclipse.jface.action.IContributionManager)1 Separator (org.eclipse.jface.action.Separator)1 DB2ObjectType (org.jkiss.dbeaver.ext.db2.editors.DB2ObjectType)1 DB2Index (org.jkiss.dbeaver.ext.db2.model.DB2Index)1 DB2Package (org.jkiss.dbeaver.ext.db2.model.DB2Package)1 DB2Routine (org.jkiss.dbeaver.ext.db2.model.DB2Routine)1 DB2Sequence (org.jkiss.dbeaver.ext.db2.model.DB2Sequence)1 DB2Table (org.jkiss.dbeaver.ext.db2.model.DB2Table)1 DB2TableBase (org.jkiss.dbeaver.ext.db2.model.DB2TableBase)1