44
55namespace QueryDB . Resources
66{
7+ /// <summary>
8+ /// Provides a set of utility functions for various operations.
9+ /// </summary>
710 internal static class Utils
811 {
12+ /// <summary>
13+ /// Checks if a specified column exists in the given data reader.
14+ /// </summary>
15+ /// <param name="reader">The data reader to check.</param>
16+ /// <param name="columnName">The name of the column to find.</param>
17+ /// <returns>Returns <c>true</c> if the column exists; otherwise, <c>false</c>.</returns>
918 internal static bool ColumnExists ( IDataReader reader , string columnName )
1019 {
1120 try
@@ -19,13 +28,27 @@ internal static bool ColumnExists(IDataReader reader, string columnName)
1928 }
2029 }
2130
31+ /// <summary>
32+ /// Determines if a specified column in an Oracle data reader is of type "BFILE".
33+ /// </summary>
34+ /// <param name="reader">The Oracle data reader containing the column.</param>
35+ /// <param name="columnIndex">The index of the column to check.</param>
36+ /// <returns>Returns <c>true</c> if the column is of type "BFILE"; otherwise, <c>false</c>.</returns>
37+
2238 internal static bool IsBFileColumn ( OracleDataReader reader , int columnIndex )
2339 {
2440 const string BFILE_COLUMN = "BFILE" ;
2541 string columnType = reader . GetDataTypeName ( columnIndex ) ;
2642 return columnType . Equals ( BFILE_COLUMN , StringComparison . OrdinalIgnoreCase ) ;
2743 }
2844
45+ /// <summary>
46+ /// Retrieves the content of a BFILE column from an Oracle data reader as a Base64-encoded string.
47+ /// </summary>
48+ /// <param name="reader">The Oracle data reader containing the BFILE column.</param>
49+ /// <param name="columnIndex">The index of the BFILE column to read.</param>
50+ /// <returns>Returns the BFILE content as a Base64-encoded string, or an empty string if the BFILE is null.</returns>
51+
2952 internal static string GetBFileContent ( OracleDataReader reader , int columnIndex )
3053 {
3154 string content = string . Empty ;
0 commit comments