C# 클래스 MicroLite.SqlUtility

A utility class containing useful methods for manipulating SQL.
파일 보기 프로젝트 열기: TrevorPilley/MicroLite

공개 메소드들

메소드 설명
GetFirstParameterPosition ( string commandText ) : int

Gets the position of the first parameter in the specified SQL command text.

GetParameterNames ( string commandText ) : IList

Gets the parameter names from the specified SQL command text or an empty list if the command text does not contain any named parameters.

Will return an empty list if the command text has no parameter names or the parameter names are all '?' (if the dialect does not support named parameters).

RenumberParameters ( string sql, int totalArgumentCount ) : string

Re-numbers the parameters in the SQL based upon the total number of arguments.

비공개 메소드들

메소드 설명
GetParameterPosition ( string commandText, int position, char matchParameterIdentifiers ) : int

메소드 상세

GetFirstParameterPosition() 공개 정적인 메소드

Gets the position of the first parameter in the specified SQL command text.
Thrown if commandText is null.
public static GetFirstParameterPosition ( string commandText ) : int
commandText string The SQL command text.
리턴 int

GetParameterNames() 공개 정적인 메소드

Gets the parameter names from the specified SQL command text or an empty list if the command text does not contain any named parameters.
Will return an empty list if the command text has no parameter names or the parameter names are all '?' (if the dialect does not support named parameters).
Thrown if commandText is null.
public static GetParameterNames ( string commandText ) : IList
commandText string The SQL command text.
리턴 IList

RenumberParameters() 공개 정적인 메소드

Re-numbers the parameters in the SQL based upon the total number of arguments.
public static RenumberParameters ( string sql, int totalArgumentCount ) : string
sql string The SQL.
totalArgumentCount int The total number of arguments.
리턴 string