C# Class Habanero.DB.SelectQueryDB

A class representing a Database SelectQuery. Wraps an ISelectQuery (Decorator pattern)
Inheritance: ISelectQuery
Datei anzeigen Open project: Chillisoft/habanero Class Usage Examples

Public Methods

Method Description
CreateSqlStatement ( ) : ISqlStatement

Creates an ISqlStatement out of the SelectQuery given in the constructor, to be used to load from a database

CreateSqlStatement ( ISqlFormatter sqlFormatter ) : ISqlStatement

Creates an ISqlStatement out of the SelectQuery given in the constructor, to be used to load from a database

SelectQueryDB ( ISelectQuery selectQuery, IDatabaseConnection databaseConnection ) : System

Creates a SelectQueryDB, wrapping an ISelectQuery (Decorator pattern)

Private Methods

Method Description
AddAliasForSource ( Source source ) : void
AddParameter ( object value, SqlStatement statement ) : string
AppendAsc ( StringBuilder builder ) : void
AppendDesc ( StringBuilder builder ) : void
AppendFields ( StringBuilder builder ) : void
AppendFrom ( StringBuilder builder ) : void
AppendLimitClauseAtBeginning ( StringBuilder builder ) : void
AppendLimitClauseAtEnd ( StringBuilder builder ) : void
AppendMainSelectClause ( SqlStatement statement, StringBuilder builder ) : void
AppendNoOfRecordsClauseAtBeginning ( StringBuilder builder ) : void
AppendNoOfRecordsClauseAtEnd ( StringBuilder builder ) : void
AppendOrderBy ( StringBuilder builder, string selectName, bool reverseSortDirection ) : void
AppendOrderByClause ( StringBuilder builder ) : void
AppendOrderByField ( StringBuilder orderByClause, OrderCriteriaField orderOrderCriteriaField ) : void
AppendOrderByFirstSelect ( StringBuilder builder ) : void
AppendOrderBySecondSelect ( StringBuilder builder ) : void
AppendWhereClause ( StringBuilder builder, SqlStatement statement ) : void
CheckRecordOffSetAndAppendFields ( StringBuilder builder ) : void
CreateInClause ( SqlStatement statement, object value ) : string
DelimitField ( string entityName, string fieldName ) : string
DelimitFieldName ( string fieldName ) : string
DelimitTable ( string tableName ) : string
GetOrderByFieldName ( OrderCriteriaField orderOrderCriteriaField ) : string
SetupAliases ( ) : void

Sets up the aliases to use for each of the sources in this select query.

Method Details

CreateSqlStatement() public method

Creates an ISqlStatement out of the SelectQuery given in the constructor, to be used to load from a database
public CreateSqlStatement ( ) : ISqlStatement
return ISqlStatement

CreateSqlStatement() public method

Creates an ISqlStatement out of the SelectQuery given in the constructor, to be used to load from a database
public CreateSqlStatement ( ISqlFormatter sqlFormatter ) : ISqlStatement
sqlFormatter ISqlFormatter
return ISqlStatement

SelectQueryDB() public method

Creates a SelectQueryDB, wrapping an ISelectQuery (Decorator pattern)
public SelectQueryDB ( ISelectQuery selectQuery, IDatabaseConnection databaseConnection ) : System
selectQuery ISelectQuery
databaseConnection IDatabaseConnection
return System