C# Class PetShop.Data.SqlExpressionParser

Inheritance: ExpressionParserBase
Show file Open project: netTiers/netTiers

Public Methods

Method Description
Parse ( String value ) : String

Parses the specified value into separate search terms.

SqlExpressionParser ( String propertyName ) : System

Initializes a new instance of the SqlExpressionParser class.

SqlExpressionParser ( String propertyName, SqlComparisonType comparisonType ) : System

Initializes a new instance of the SqlExpressionParser class.

SqlExpressionParser ( String propertyName, SqlComparisonType comparisonType, bool ignoreCase ) : System

Initializes a new instance of the SqlExpressionParser class.

SqlExpressionParser ( String propertyName, bool ignoreCase ) : System

Initializes a new instance of the SqlExpressionParser class.

Protected Methods

Method Description
AppendAnd ( ) : void

Appends "AND" to the SQL statement.

AppendOr ( ) : void

Appends "OR" to the SQL statement.

AppendSearchText ( string searchText ) : void

Appends the specified search text to the SQL statement.

AppendSpace ( ) : void

Appends a space to the SQL statement.

CloseGrouping ( ) : void

Appends a right parentheses to the SQL statement.

Contains ( String column, String value, bool ignoreCase ) : String

Creates a SqlComparisonType.Contains expression.

EndsWith ( String column, String value, bool ignoreCase ) : String

Creates a SqlComparisonType.EndsWith expression.

Equals ( String column, String value, bool ignoreCase ) : String

Creates a SqlComparisonType.Equals expression.

Like ( String column, String value, bool ignoreCase ) : String

Creates a SqlComparisonType.Like expression.

OpenGrouping ( ) : void

Appends a left parentheses to the SQL statement.

StartsWith ( String column, String value, bool ignoreCase ) : String

Creates a SqlComparisonType.StartsWith expression.

WrapWithSQL ( String propertyName, String value, bool ignoreCase ) : String

Converts the search text into a valid search expression.

Method Details

AppendAnd() protected method

Appends "AND" to the SQL statement.
protected AppendAnd ( ) : void
return void

AppendOr() protected method

Appends "OR" to the SQL statement.
protected AppendOr ( ) : void
return void

AppendSearchText() protected method

Appends the specified search text to the SQL statement.
protected AppendSearchText ( string searchText ) : void
searchText string The search text to append.
return void

AppendSpace() protected method

Appends a space to the SQL statement.
protected AppendSpace ( ) : void
return void

CloseGrouping() protected method

Appends a right parentheses to the SQL statement.
protected CloseGrouping ( ) : void
return void

Contains() protected method

Creates a SqlComparisonType.Contains expression.
protected Contains ( String column, String value, bool ignoreCase ) : String
column String
value String
ignoreCase bool
return String

EndsWith() protected method

Creates a SqlComparisonType.EndsWith expression.
protected EndsWith ( String column, String value, bool ignoreCase ) : String
column String
value String
ignoreCase bool
return String

Equals() protected method

Creates a SqlComparisonType.Equals expression.
protected Equals ( String column, String value, bool ignoreCase ) : String
column String
value String
ignoreCase bool
return String

Like() protected method

Creates a SqlComparisonType.Like expression.
protected Like ( String column, String value, bool ignoreCase ) : String
column String
value String
ignoreCase bool
return String

OpenGrouping() protected method

Appends a left parentheses to the SQL statement.
protected OpenGrouping ( ) : void
return void

Parse() public method

Parses the specified value into separate search terms.
public Parse ( String value ) : String
value String The search text.
return String

SqlExpressionParser() public method

Initializes a new instance of the SqlExpressionParser class.
public SqlExpressionParser ( String propertyName ) : System
propertyName String
return System

SqlExpressionParser() public method

Initializes a new instance of the SqlExpressionParser class.
public SqlExpressionParser ( String propertyName, SqlComparisonType comparisonType ) : System
propertyName String
comparisonType SqlComparisonType
return System

SqlExpressionParser() public method

Initializes a new instance of the SqlExpressionParser class.
public SqlExpressionParser ( String propertyName, SqlComparisonType comparisonType, bool ignoreCase ) : System
propertyName String
comparisonType SqlComparisonType
ignoreCase bool
return System

SqlExpressionParser() public method

Initializes a new instance of the SqlExpressionParser class.
public SqlExpressionParser ( String propertyName, bool ignoreCase ) : System
propertyName String
ignoreCase bool
return System

StartsWith() protected method

Creates a SqlComparisonType.StartsWith expression.
protected StartsWith ( String column, String value, bool ignoreCase ) : String
column String
value String
ignoreCase bool
return String

WrapWithSQL() protected method

Converts the search text into a valid search expression.
protected WrapWithSQL ( String propertyName, String value, bool ignoreCase ) : String
propertyName String
value String
ignoreCase bool
return String