Skip to content

Commit

Permalink
Change SqlStatements access modifier to protected
Browse files Browse the repository at this point in the history
Short Version: other sql execution methods can be overridden, but this one cannot (e.g. Save).  As such derived code has to live with these limited select statements instead of having the opportunity to customize them.  To resolve this I propose changing the access modifier from 'private const' to 'protected'

Long Version:
Rational is:
1)  Would like to use NuGet package instead of building source code locally with each build
2)  Custom storage engine in its own project inherits from SqlServerStorage.
3)  Custom storage engine modifies the queries as the backing DB has been changed.
4)  Custom storage engine can't get access to 'private const SqlStatements'
3)  Can't X-Copy many/all the methods as the MiniProfiler class (used line 303) is defined as 'internal' (remember custom storage engine is in another project) and the build fails.
  • Loading branch information
Kernel-Klink committed Jan 13, 2016
1 parent d0c30ec commit 74e0567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion StackExchange.Profiling/Storage/SqlServerStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SqlServerStorage : DatabaseStorageBase
/// <summary>
/// Load the SQL statements (using Dapper Multiple Results)
/// </summary>
private const string SqlStatements = @"
protected string SqlStatements = @"
SELECT * FROM MiniProfilers WHERE Id = @id;
SELECT * FROM MiniProfilerTimings WHERE MiniProfilerId = @id ORDER BY StartMilliseconds;
SELECT * FROM MiniProfilerClientTimings WHERE MiniProfilerId = @id ORDER BY Start;";
Expand Down

0 comments on commit 74e0567

Please sign in to comment.