use of org.jkiss.dbeaver.ext.db2.model.DB2TableKeyColumn in project dbeaver by serge-rider.
the class DB2TableForeignKeyCache method fetchObjectRow.
@Nullable
@Override
protected DB2TableKeyColumn[] fetchObjectRow(JDBCSession session, DB2Table db2Table, DB2TableForeignKey object, JDBCResultSet dbResult) throws SQLException, DBException {
String colName = JDBCUtils.safeGetString(dbResult, "COLNAME");
DB2TableColumn tableColumn = db2Table.getAttribute(session.getProgressMonitor(), colName);
if (tableColumn == null) {
log.debug("DB2TableForeignKeyCache : Column '" + colName + "' not found in table '" + db2Table.getFullyQualifiedName(DBPEvaluationContext.UI) + "' ??");
return null;
} else {
return new DB2TableKeyColumn[] { new DB2TableKeyColumn(object, tableColumn, JDBCUtils.safeGetInt(dbResult, "COLSEQ")) };
}
}
use of org.jkiss.dbeaver.ext.db2.model.DB2TableKeyColumn in project dbeaver by serge-rider.
the class DB2TableUniqueKeyCache method fetchObjectRow.
@Nullable
@Override
protected DB2TableKeyColumn[] fetchObjectRow(JDBCSession session, DB2Table db2Table, DB2TableUniqueKey object, JDBCResultSet dbResult) throws SQLException, DBException {
String colName = JDBCUtils.safeGetString(dbResult, "COLNAME");
DB2TableColumn tableColumn = db2Table.getAttribute(session.getProgressMonitor(), colName);
if (tableColumn == null) {
log.debug("Column '" + colName + "' not found in table '" + db2Table.getFullyQualifiedName(DBPEvaluationContext.UI) + "' ??");
return null;
} else {
return new DB2TableKeyColumn[] { new DB2TableKeyColumn(object, tableColumn, JDBCUtils.safeGetInt(dbResult, "COLSEQ")) };
}
}
use of org.jkiss.dbeaver.ext.db2.model.DB2TableKeyColumn in project dbeaver by serge-rider.
the class DB2TableReferenceCache method fetchObjectRow.
@Nullable
@Override
protected DB2TableKeyColumn[] fetchObjectRow(JDBCSession session, DB2Table db2Table, DB2TableReference db2TableReference, JDBCResultSet dbResult) throws SQLException, DBException {
String colName = JDBCUtils.safeGetString(dbResult, "COLNAME");
DB2TableColumn tableColumn = db2Table.getAttribute(session.getProgressMonitor(), colName);
if (tableColumn == null) {
log.debug("DB2TableReferenceCache : Column '" + colName + "' not found in table '" + db2Table.getName() + "' ??");
return null;
} else {
return new DB2TableKeyColumn[] { new DB2TableKeyColumn(db2TableReference, tableColumn, JDBCUtils.safeGetInt(dbResult, "COLSEQ")) };
}
}
Aggregations