Permalink
Browse files

commenting for formatters

  • Loading branch information...
1 parent 2c360c5 commit feffb4bff690aba85abb5eb4d504a7277afaede9 ncraver committed Jun 22, 2011
@@ -1,10 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace MvcMiniProfiler
+namespace MvcMiniProfiler
{
+ /// <summary>
+ /// Takes a SqlTiming and returns a formatted SQL string, for parameter replacement, etc.
+ /// </summary>
public interface ISqlFormatter
{
/// <summary>
@@ -19,6 +19,11 @@ public InlineFormatter(bool includeTypeInfo = false)
_includeTypeInfo = includeTypeInfo;
}
+ /// <summary>
+ /// Formats the SQL in a generic frieldly format, including the parameter type information in a comment if it was specified in the InlineFormatter constructor
+ /// </summary>
+ /// <param name="timing">The SqlTiming to format</param>
+ /// <returns>A formatted SQL string</returns>
public string FormatSql(SqlTiming timing)
{
var sql = timing.CommandString;
@@ -5,8 +5,14 @@
namespace MvcMiniProfiler.SqlFormatters
{
+ /// <summary>
+ /// NOT IMPLEMENTED - will format statements with paramters in an Oracle friendly way
+ /// </summary>
public class OracleFormatter : ISqlFormatter
- {
+ {
+ /// <summary>
+ /// Does NOTHING, implement me!
+ /// </summary>
public string FormatSql(SqlTiming timing)
{
// It would be nice to have an oracle formatter, if anyone feel up to the challange a patch would be awesome
@@ -41,6 +41,11 @@ static SqlServerFormatter()
}
+ /// <summary>
+ /// Formats the SQL in a SQL-Server friendly way, with DECLARE statements for the parameters up top.
+ /// </summary>
+ /// <param name="timing">The SqlTiming to format</param>
+ /// <returns>A formatted SQL string</returns>
public string FormatSql(SqlTiming timing)
{

0 comments on commit feffb4b

Please sign in to comment.