Skip to content

Commit 015bb03

Browse files
committed
Refactor IsBFileColumn() - Column exists check in caller function
1 parent 8fd3498 commit 015bb03

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

QueryDB/Resources/Utils.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,9 @@ internal static bool IsBFileColumn(OracleDataReader reader, int columnIndex)
5050
internal static bool IsBFileColumn(OracleDataReader reader, string columnName)
5151
{
5252
const string BFILE_COLUMN = "BFILE";
53-
try
54-
{
55-
int columnIndex = reader.GetOrdinal(columnName);
56-
string columnType = reader.GetDataTypeName(columnIndex);
57-
return columnType.Equals(BFILE_COLUMN, StringComparison.OrdinalIgnoreCase);
58-
}
59-
catch (IndexOutOfRangeException)
60-
{
61-
return false;
62-
}
53+
int columnIndex = reader.GetOrdinal(columnName);
54+
string columnType = reader.GetDataTypeName(columnIndex);
55+
return columnType.Equals(BFILE_COLUMN, StringComparison.OrdinalIgnoreCase);
6356
}
6457

6558
/// <summary>

0 commit comments

Comments
 (0)