프로퍼티 | 타입 | 설명 | |
---|---|---|---|
AppendFromWhereOrderByGroupByHaving | void | ||
EnsureJoin | void | ||
IFilterableQuery | void | ||
IGetExpressionByName | string | ||
ISqlQueryExtensible | int | ||
ISqlQueryExtensible | void | ||
JoinToString | void |
메소드 | 설명 | |
---|---|---|
Clone ( ) : |
Creates a clone of the query. Clones states like TrackAssignments, AssignedFields etc, creates a copy of Params dictionary |
|
Dialect ( ) : ISqlDialect |
Gets the dialect (SQL server type / version) for query.
|
|
Dialect ( ISqlDialect dialect ) : |
Sets the dialect (SQL server type / version) for query. TODO: SqlDialect system should be improved. |
|
Distinct ( bool distinct ) : |
Sets DISTINCT flag.
|
|
EnsureJoin ( Serenity.Data.Join join ) : |
||
EnsureJoinsInExpression ( string expression ) : |
||
ForXml ( string forXml ) : |
||
From ( IAlias alias ) : |
Adds a table to the FROM statement, with given short name. This overload requires that alias has a table name. |
|
From ( ISqlQuery subQuery, IAlias alias ) : |
Adds a subquery to the FROM statement, with given short name. This overload requires that alias has a table name. |
|
From ( string table ) : |
Adds a table to the FROM statement. When it is called more than once, puts a comma between table names (cross join)
|
|
From ( string table, IAlias alias ) : |
Adds a table to the FROM statement with an alias. When it is called more than once, puts a comma between table names (cross join)
|
|
GroupBy ( IAlias alias, string fieldName ) : |
Adds a field of a given table alias to the GROUP BY clause.
|
|
GroupBy ( string expression ) : |
Adds a field name or an SQL expression to the GROUP BY clause.
|
|
Having ( string expression ) : |
Adds an SQL expression to the GROUP BY clause.
|
|
InnerJoin ( IAlias alias, ICriteria onCriteria ) : |
||
Join ( Serenity.Data.Join join ) : |
||
LeftJoin ( IAlias alias, ICriteria onCriteria ) : |
||
LeftJoin ( string toTable, IAlias alias, ICriteria onCriteria ) : |
||
OrderBy ( IAlias alias, string fieldName, bool desc = false ) : |
Adds a field of a given table alias to the ORDER BY clause.
|
|
OrderBy ( string expression, bool desc = false ) : |
Adds a field name or an SQL expression to the ORDER BY clause.
|
|
OrderByFirst ( string expression, bool desc = false ) : |
Inserts a field name or an SQL expression to the start of ORDER BY clause. This method is designed to help apply user defined orders (for example by clicking headers on a grid) to a query with existing order. SQL server throws an error if a field is used more than once in ORDER BY expression, so this function first removes normal and DESC versions of the expression from the ORDER BY statement. |
|
RightJoin ( IAlias alias, ICriteria onCriteria ) : |
||
RightJoin ( string toTable, IAlias alias, ICriteria onCriteria ) : |
||
Select ( IAlias alias, string fieldName ) : |
Adds a field of a given table alias to the SELECT statement. No column name is used for the field or expression. |
|
Select ( IAlias alias, string fieldName, string columnName ) : |
Adds a field of a given table alias to the SELECT statement with a column name.
|
|
Select ( ISqlQuery expression ) : |
Adds a subquery to the SELECT statement.
|
|
Select ( ISqlQuery expression, string columnName ) : |
Adds a subquery to the SELECT statement.
|
|
Select ( string expression ) : |
Adds a field name or an SQL expression to the SELECT statement. No column name is used for the field or expression. |
|
Select ( string expression, string columnName ) : |
Adds a field name or expression to the SELECT statement with a column name
|
|
SelectMany ( ) : |
Adds field names or SQL expressions to the SELECT statement. No aliases are used for the fields or expressions. |
|
Skip ( int skipRows ) : |
Sets SKIP value. Used for paging.
|
|
Skip ( ) : int |
Gets current SKIP value.
|
|
SqlQuery ( ) : System |
Creates a new SqlQuery instance.
|
|
SubQuery ( ) : |
Creates a new query that shares parameter dictionary with this query.
|
|
Take ( int rowCount ) : |
Sets TAKE/TOP value. Used for paging.
|
|
Take ( ) : int |
Gets TAKE/TOP value.
|
|
ToString ( ) : string |
SqlSelect sorgusunu formatlayıp bir SELECT sorgusuna çevirir. Sayfalama sözkonusuysa (atlanan kayıt varsa) birden fazla sorgu arka arkaya oluşturulur.
|
|
Where ( ) : |
Adds expressions to WHERE clause, inserting AND between them.
|
|
Where ( string expression ) : |
Adds an expression to WHERE clause. If query already has a WHERE clause, inserts AND between existing one and new one.
|
메소드 | 설명 | |
---|---|---|
AppendFromWhereOrderByGroupByHaving ( StringBuilder sb, string extraWhere, bool includeOrderBy ) : void |
Verilen StringBuilder nesnesine SqlSelect'in FROM, WHERE, ORDER BY, GROUP BY, HAVING kısımlarını, belirtilirse bir ek filtre de gözönüne alınarak ekler. Sayfalama için üretilen sorgularda SqlSelect'in bu kısımları iki ayrı yerde (birinde ek bir koşulla birlikte) kullanıldığından, bu şekilde yapılarak, kod tekrarının önüne geçilmiştir. |
|
EnsureJoin ( string joinAlias ) : void | ||
IFilterableQuery ( string expression ) : void |
Implements IDBFilterable.Where, by calling original Where method.
|
|
IGetExpressionByName ( string columnName ) : string |
Gets the source expression for a column name in the query. This function uses a linear search in column list, so use with caution. |
|
ISqlQueryExtensible ( IField field ) : int | ||
ISqlQueryExtensible ( object row ) : void | ||
JoinToString ( Serenity.Data.Join join, StringBuilder sb, bool modifySelf ) : void |
public Distinct ( bool distinct ) : |
||
distinct | bool | Distinct flag. |
리턴 |
public EnsureJoin ( Serenity.Data.Join join ) : |
||
join | Serenity.Data.Join | |
리턴 |
public EnsureJoinsInExpression ( string expression ) : |
||
expression | string | |
리턴 |
public From ( IAlias alias ) : |
||
alias | IAlias | Alias that contains table name and short name. |
리턴 |
public From ( ISqlQuery subQuery, IAlias alias ) : |
||
subQuery | ISqlQuery | A subquery |
alias | IAlias | Alias that contains the short name. |
리턴 |
public From ( string table, IAlias alias ) : |
||
table | string | Table |
alias | IAlias | Alias for the table |
리턴 |
public GroupBy ( IAlias alias, string fieldName ) : |
||
alias | IAlias | A table alias that will be prepended to the field name with "." between |
fieldName | string | A field name of the aliased table. |
리턴 |
public GroupBy ( string expression ) : |
||
expression | string | Array of fields or expressions. |
리턴 |
public Having ( string expression ) : |
||
expression | string | Array of fields or expressions. |
리턴 |
public InnerJoin ( IAlias alias, ICriteria onCriteria ) : |
||
alias | IAlias | |
onCriteria | ICriteria | |
리턴 |
public Join ( Serenity.Data.Join join ) : |
||
join | Serenity.Data.Join | |
리턴 |
public LeftJoin ( IAlias alias, ICriteria onCriteria ) : |
||
alias | IAlias | |
onCriteria | ICriteria | |
리턴 |
public LeftJoin ( string toTable, IAlias alias, ICriteria onCriteria ) : |
||
toTable | string | |
alias | IAlias | |
onCriteria | ICriteria | |
리턴 |
public OrderBy ( IAlias alias, string fieldName, bool desc = false ) : |
||
alias | IAlias | A table alias that will be prepended to the field name with "." between |
fieldName | string | A field name of the aliased table. |
desc | bool | True to add " DESC" keyword to the expression. |
리턴 |
public OrderBy ( string expression, bool desc = false ) : |
||
expression | string | A field or an SQL expression. |
desc | bool | True to add " DESC" keyword to the expression. |
리턴 |
public OrderByFirst ( string expression, bool desc = false ) : |
||
expression | string | A field or an SQL expression. |
desc | bool | True to add a " DESC" suffix. |
리턴 |
public RightJoin ( IAlias alias, ICriteria onCriteria ) : |
||
alias | IAlias | |
onCriteria | ICriteria | |
리턴 |
public RightJoin ( string toTable, IAlias alias, ICriteria onCriteria ) : |
||
toTable | string | |
alias | IAlias | |
onCriteria | ICriteria | |
리턴 |
public Select ( IAlias alias, string fieldName ) : |
||
alias | IAlias | A table alias that will be prepended to the field name with "." between |
fieldName | string | A field name of the aliased table. |
리턴 |
public Select ( IAlias alias, string fieldName, string columnName ) : |
||
alias | IAlias | A table alias that will be prepended to the field name with "." between |
fieldName | string | A field name of the aliased table. |
columnName | string | A column name |
리턴 |
public Select ( ISqlQuery expression ) : |
||
expression | ISqlQuery | A subquery. |
리턴 |
public Select ( ISqlQuery expression, string columnName ) : |
||
expression | ISqlQuery | A subquery. |
columnName | string | A column name |
리턴 |
public Select ( string expression ) : |
||
expression | string | A field or an SQL expression. |
리턴 |
public Select ( string expression, string columnName ) : |
||
expression | string | A field name or SQL expression. |
columnName | string | A column name. |
리턴 |
public Skip ( int skipRows ) : |
||
skipRows | int | Number of rows to skip (server dependant implementation) |
리턴 |
public Take ( int rowCount ) : |
||
rowCount | int | Number of rows to take. |
리턴 |
public Where ( string expression ) : |
||
expression | string | An expression |
리턴 |