use of org.jkiss.dbeaver.ext.db2.model.DB2TableCheckConstraintColumn in project dbeaver by serge-rider.
the class DB2TableCheckConstraintCache method fetchObjectRow.
@Nullable
@Override
protected DB2TableCheckConstraintColumn[] fetchObjectRow(JDBCSession session, DB2Table db2Table, DB2TableCheckConstraint object, JDBCResultSet dbResult) throws SQLException, DBException {
String colName = JDBCUtils.safeGetString(dbResult, "COLNAME");
DB2TableColumn tableColumn = db2Table.getAttribute(session.getProgressMonitor(), colName);
DB2TableCheckConstraintColUsage usage = CommonUtils.valueOf(DB2TableCheckConstraintColUsage.class, JDBCUtils.safeGetString(dbResult, "USAGE"));
if (tableColumn == null) {
log.debug("Column '" + colName + "' not found in table '" + db2Table.getFullyQualifiedName(DBPEvaluationContext.UI) + "' ??");
return null;
} else {
return new DB2TableCheckConstraintColumn[] { new DB2TableCheckConstraintColumn(object, tableColumn, usage) };
}
}
Aggregations