C# Class Habanero.Base.CriteriaDB

This class inherits from the Criteria class and implements a ToString(Habanero.Base.ISqlFormatter,Habanero.Base.CriteriaDB.AddParameterDelegate,System.Collections.Generic.IDictionary{string,string}) behaviour. This allows the formatting of a criteria object into a format specific for the database.
Inheritance: Criteria
Show file Open project: Chillisoft/habanero Class Usage Examples

Public Methods

Method Description
CriteriaDB ( Criteria criteria ) : System

Constructor for a Database critieria. takes the Criteria object that it wraps as a parameter.

ToString ( ) : string

Returns a that represents the current .

ToString ( ISqlFormatter formatter, AddParameterDelegate addParameter ) : string

Converts this Criteria to a string for use in a sql statement.

ToString ( ISqlFormatter formatter, AddParameterDelegate addParameter, string>.IDictionary aliases ) : string

Converts this Criteria object to a string, using field names instead of property names and entity names (aliased) instead of source names. The AddParameterDelegate allows a database query builder to create a parameter value when adding the value to the string for use with parametrized SQL. Also see ISqlStatement. The ToString() method uses this method with a simple delegate that converts DateTimes and Guids to sensible string representations and to Provide a set of aliases to replace entity names with their aliases.

Method Details

CriteriaDB() public method

Constructor for a Database critieria. takes the Criteria object that it wraps as a parameter.
public CriteriaDB ( Criteria criteria ) : System
criteria Criteria The criteria object being wrapped.
return System

ToString() public method

Returns a that represents the current .
public ToString ( ) : string
return string

ToString() public method

Converts this Criteria to a string for use in a sql statement.
public ToString ( ISqlFormatter formatter, AddParameterDelegate addParameter ) : string
formatter ISqlFormatter The formatter to use
addParameter AddParameterDelegate A delegate defining how to add a parameter to the string.
return string

ToString() public method

Converts this Criteria object to a string, using field names instead of property names and entity names (aliased) instead of source names. The AddParameterDelegate allows a database query builder to create a parameter value when adding the value to the string for use with parametrized SQL. Also see ISqlStatement. The ToString() method uses this method with a simple delegate that converts DateTimes and Guids to sensible string representations and to Provide a set of aliases to replace entity names with their aliases.
public ToString ( ISqlFormatter formatter, AddParameterDelegate addParameter, string>.IDictionary aliases ) : string
formatter ISqlFormatter A formatter for any specific database
addParameter AddParameterDelegate The delegate to use to convert the value in object form to a value in string form. /// See
aliases string>.IDictionary The mapping of aliases to use
return string