C# Class StackExchange.Profiling.SqlFormatters.SqlServerFormatter

Formats SQL server queries with a DECLARE up top for parameter values
Inheritance: ISqlFormatter
Exibir arquivo Open project: NGPVAN/MiniProfiler Class Usage Examples

Public Methods

Method Description
FormatSql ( SqlTiming timing ) : string

Formats the SQL in a SQL-Server friendly way, with DECLARE statements for the parameters up top.

Private Methods

Method Description
GenerateStreamFromString ( string s ) : Stream
GetJsonVal ( SqlTimingParameter p ) : string
GetWithLenFormatter ( string native ) : string>.Func

get the 'with length' formatter.

PrepareValue ( SqlTimingParameter parameter ) : string

prepare the value.

SqlServerFormatter ( ) : System

Initialises static members of the SqlServerFormatter class.

Method Details

FormatSql() public method

Formats the SQL in a SQL-Server friendly way, with DECLARE statements for the parameters up top.
public FormatSql ( SqlTiming timing ) : string
timing SqlTiming The SqlTiming to format
return string