Skip to main content

sqlstatement-class

Represents the result of performing BuildSQL command.

public class Korzh.EasyQuery.Db.SqlStatement
: QueryStatement, ISqlStatement, IQueryStatement

Assembly: Korzh.EasyQuery.Db.dll

Constructors

NameTypeDescription
SqlStatement(SqlQueryBuilder builder)voidInitializes a new instance of the Korzh.EasyQuery.Db.SqlStatement class.

Properties

NameTypeDescription
BuiltSQLstringGet the text of the genereted SQL statement
CountSQLstringGets the text of result SQL statement for count total rows.
FromClausestringGets the text of FROM clause.
GroupClausestringGets the text of GROUP BY clause.
HasChunkLimitboolGets a value indicating whether the result query statement includes paging (offset/fetch/limit) clauses.
HavingClausestringGets the text of HAVING clause.
OrderClausestringGets the text of ORDER BY clause.
QueryDbQueryGets the query.
RootNodeResultTableNodeGets or sets the root table node in the generated SQL statement.
RowNumberAliasstringGets the alias for Total Records column. This option works only if is true.
SelectClausestringGets the text of SELECT clause.
SQLstringGets the text of result SQL statement.
WhereClausestringGets the text of WHERE clause.

Methods

NameTypeDescription
AddCondition(string s)voidAdds text of some condition to WHERE clause.
AddHavingCondition(string s)voidAdds text of some condition to HAVING clause.
AddToHavingClause(string s)voidAdds some text to HAVING clause.
AddToWhereClause(string s)voidAdds some text to WHERE clause.
ClearAll()void
GetAsSection()string
GetCountTableAlias()string
GetSql(string selectExpr, string orderExpr)stringGets the SQL statement with custom SELECT and ORDER BY clauses.
GetStatement()stringReturns the statement (SQL, filter expression, etc - depending on the concrete QueryBuilderResult type).
ToString()stringReturns a System.String that represents this instance.