Skip to content

Commit f25a063

Browse files
committed
Remove unused extension methods
When I introduced the `SqlDataReader` extension methods in #dde0ade, I added a few that _might_ be needed—and, indeed, might _still_ be needed in the future—but aren't needed _yet_. Since this is a private library intended only to support the `SqlTopicRepository`, there's no real benefit to maintaining private methods that aren't being used. And, in fact, given _how_ they're being used, it's unlikely (but not impossible) that we'll need them given the current approach to the SQL schema. (I.e., since most attributes are stored as strings in both the database as well as the topic library, there isn't a need to use e.g. `GetBoolean()`, unless we add a new metadata column that's a `BIT`.)
1 parent e8e9991 commit f25a063

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

OnTopic.Data.Sql/SqlDataReaderExtensions.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ namespace OnTopic.Data.Sql {
1919
/// </summary>
2020
internal static class SqlDataReaderExtensions {
2121

22-
2322
/*==========================================================================================================================
2423
| DELEGATE: TRY PARSE
2524
\-------------------------------------------------------------------------------------------------------------------------*/
@@ -47,17 +46,6 @@ internal static int GetInteger(this SqlDataReader reader, string columnName) =>
4746
internal static string GetString(this SqlDataReader reader, string columnName) =>
4847
GetValue<string>(reader, columnName, (string source, out string value) => { value = source; return true; }, String.Empty);
4948

50-
/*==========================================================================================================================
51-
| METHOD: GET DATE/TIME
52-
\-------------------------------------------------------------------------------------------------------------------------*/
53-
/// <summary>
54-
/// Retrieves a <see cref="DateTime"/> value by column name.
55-
/// </summary>
56-
/// <param name="reader">The <see cref="SqlDataReader"/> object.</param>
57-
/// <param name="columnName">The name of the column to retrieve the value from.</param>
58-
internal static DateTime GetDateTime(this SqlDataReader reader, string columnName) =>
59-
GetValue<DateTime>(reader, columnName, DateTime.TryParse, DateTime.MinValue);
60-
6149
/*==========================================================================================================================
6250
| METHOD: GET VERSION
6351
\-------------------------------------------------------------------------------------------------------------------------*/
@@ -68,17 +56,6 @@ internal static DateTime GetDateTime(this SqlDataReader reader, string columnNam
6856
internal static DateTime GetVersion(this SqlDataReader reader) =>
6957
reader.GetDateTime(reader.GetOrdinal("Version"));
7058

71-
/*==========================================================================================================================
72-
| METHOD: GET BOOLEAN
73-
\-------------------------------------------------------------------------------------------------------------------------*/
74-
/// <summary>
75-
/// Retrieves a <see cref="Boolean"/> value by column name.
76-
/// </summary>
77-
/// <param name="reader">The <see cref="SqlDataReader"/> object.</param>
78-
/// <param name="columnName">The name of the column to retrieve the value from.</param>
79-
internal static bool GetBoolean(this SqlDataReader reader, string columnName) =>
80-
GetValue<bool>(reader, columnName, Boolean.TryParse, false);
81-
8259
/*==========================================================================================================================
8360
| METHOD: GET VALUE
8461
\-------------------------------------------------------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)