SqlStatement class

Represents the result of performing BuildSQL command.

public class Korzh.EasyQuery.Db.SqlStatement
    : QueryBuilderResult

Fields

Type Name Description
Boolean _needGroupBy

Properties

Type Name Description
String EntitySql Gets the "entity SQL" (for Entity Framework).
SqlExtras ExtraClauses Gets the Korzh.EasyQuery.Db.SqlExtras object which defines some extra clauses of generated query.
DbQueryFormats Formats Gets the Korzh.EasyQuery.Db.DbQueryFormats object in the parent query.
String FromClause Gets the text of FROM clause.
String GroupClause Gets the text of GROUP BY clause.
Boolean HasPaging Gets or sets a value indicating whether the result query statement includes paging clauses.
String HavingClause Gets the text of HAVING clause.
Boolean NeedGroupBy Gets a value indicating whether GROUP BY section is necessary in result SQL.
String OrderClause Gets the text of ORDER BY clause.
ResultSetPortion Portion Allows to specify a portion of result set to return.
DbQuery Query Gets the query.
String RecordCountAlias Gets the alias for Total Records column. This option works only if RecordCountTemplate is not empty
ResultTable RootTable Gets the root (first) table used in query.
String SelectClause Gets the text of SELECT clause.
String SQL Gets the text of result SQL statement.
String WhereClause Gets the text of WHERE clause.

Methods

Type Name Description
void AddCondition(String s) Adds text of some condition to WHERE clause.
void AddHavingCondition(String s) Adds text of some condition to HAVING clause.
Boolean AddJoinToAppropriateResultTable(ResultTable resTable, Table table, String condExpr)
void AddToAppropriateJoin(Table table, String condExpr)
void AddToHavingClause(String s) Adds some text to HAVING clause.
void AddToWhereClause(String s) Adds some text to WHERE clause.
void ClearAll() Clears all clauses.
void ClearHavingClause() Clears the HAVING clause.
void ClearWhereClause() Clears the WHERE clause.
String GetSql(String selectExpr, String orderExpr) Gets the SQL statement with custom SELECT and ORDER BY clauses.
String GetStatement() Returns the statement (SQL, filter expression, etc - depending on the concrete QueryBuilderResult type).
void SetRootTable(Table ATable)
String ToString() Returns a System.String that represents this instance.