C# Class Habanero.Base.QueryField

Represents a field used in a query. In a database context, this represents a field listed in the SELECT clause of a sql statement
Inheritance: ISelfFormattingField
显示文件 Open project: Chillisoft/habanero Class Usage Examples

Public Methods

Method Description
FromString ( string fieldString ) : QueryField

Creates a QueryField object by parsing a string in the correct format. The format is:

<queryField> => [<source>.]<fieldName>

<source> => [<source>.]<sourceName>

For example: Surname or ContactPerson.Company.Name

GetFormattedStringWith ( ISqlFormatter formatter, string>.IDictionary aliases ) : string

Gets the formatted string for this field to be used in queries

QueryField ( string propertyName, string fieldName, Source source ) : System

Creates a QueryField with the given property name, field name and source name

Method Details

FromString() public static method

Creates a QueryField object by parsing a string in the correct format. The format is:

<queryField> => [<source>.]<fieldName>

<source> => [<source>.]<sourceName>

For example: Surname or ContactPerson.Company.Name
public static FromString ( string fieldString ) : QueryField
fieldString string The string in the correct format (see above)
return QueryField

GetFormattedStringWith() public method

Gets the formatted string for this field to be used in queries
public GetFormattedStringWith ( ISqlFormatter formatter, string>.IDictionary aliases ) : string
formatter ISqlFormatter An ISqlFormatter to format with
aliases string>.IDictionary The dictionary of aliases within the context to be formatted for
return string

QueryField() public method

Creates a QueryField with the given property name, field name and source name
public QueryField ( string propertyName, string fieldName, Source source ) : System
propertyName string The name of the property (as defined in the ClassDef) that this QueryField is for
fieldName string The name of the field in the data source that this QueryField is for
source Source The source (such as a table) that this QueryField is from.
return System