C# Class Serenity.Data.EntitySqlQueryExtensions

Extensions for SqlQuery.
Mostrar archivo Open project: volkanceylan/Serenity

Public Methods

Method Description
From ( this query, IEntity entity ) : SqlQuery

Adds a table to the FROM statement with "T0" alias and sets it as target for future field selections.

GroupBy ( this query ) : SqlQuery
GroupBy ( this query, IField field ) : SqlQuery
Into ( this query, IEntity into ) : SqlQuery
OrderBy ( this query ) : SqlQuery
OrderBy ( this query, IField field, bool desc = false ) : SqlQuery
Select ( this query ) : SqlQuery

For each field in the fields array, adds expression of the field to the SELECT statement with a column name of its name. If a join alias is referenced in the field expression, and the join is defined in field's entity class, it is automatically included in the query. The fields are marked as a target at current index for future loading from a data reader.

Select ( this query, IAlias alias, IField field ) : SqlQuery

Adds a field of a given table alias to the SELECT statement.

No column name is set for the selected field. Also field is not set as a target, unlike field only overload, only field name is used.

Select ( this query, IAlias alias, IField field, string columnName ) : SqlQuery

Adds a field of a given table alias to the SELECT statement.

Field is not set as a target, unlike field only overload, only field name is used.

Select ( this query, IField field ) : SqlQuery

Adds a field's expression to the SELECT statement with its own column name. If a join alias is referenced in the field expression, and the join is defined in field's entity class, it is automatically included in the query. The field is marked as a target at current index for future loading from a data reader.

Select ( this query, IField field, string columnName ) : SqlQuery

Adds a field's expression to the SELECT statement with a given column name. If a join alias is referenced in the field expression, and the join is defined in field's entity class, it is automatically included in the query. The field is marked as a target at current index for future loading from a data reader.

SelectAs ( this query, string expression, IField intoField ) : SqlQuery

Adds a field or an expression to the SELECT statement with a column name of a field's name. The field is marked as a target at current index for future loading from a data reader.

Method Details

From() public static method

Adds a table to the FROM statement with "T0" alias and sets it as target for future field selections.
public static From ( this query, IEntity entity ) : SqlQuery
query this
entity IEntity
return SqlQuery

GroupBy() public static method

public static GroupBy ( this query ) : SqlQuery
query this
return SqlQuery

GroupBy() public static method

public static GroupBy ( this query, IField field ) : SqlQuery
query this
field IField
return SqlQuery

Into() public static method

public static Into ( this query, IEntity into ) : SqlQuery
query this
into IEntity
return SqlQuery

OrderBy() public static method

public static OrderBy ( this query ) : SqlQuery
query this
return SqlQuery

OrderBy() public static method

public static OrderBy ( this query, IField field, bool desc = false ) : SqlQuery
query this
field IField
desc bool
return SqlQuery

Select() public static method

For each field in the fields array, adds expression of the field to the SELECT statement with a column name of its name. If a join alias is referenced in the field expression, and the join is defined in field's entity class, it is automatically included in the query. The fields are marked as a target at current index for future loading from a data reader.
public static Select ( this query ) : SqlQuery
query this
return SqlQuery

Select() public static method

Adds a field of a given table alias to the SELECT statement.
No column name is set for the selected field. Also field is not set as a target, unlike field only overload, only field name is used.
public static Select ( this query, IAlias alias, IField field ) : SqlQuery
query this
alias IAlias A table alias that will be prepended to the field name with "." between
field IField A field that only name will be used. It won't be set as a target.
return SqlQuery

Select() public static method

Adds a field of a given table alias to the SELECT statement.
Field is not set as a target, unlike field only overload, only field name is used.
public static Select ( this query, IAlias alias, IField field, string columnName ) : SqlQuery
query this
alias IAlias A table alias that will be prepended to the field name with "." between
field IField A field that only its field name will be used. It won't be set as a target.
columnName string A column name
return SqlQuery

Select() public static method

Adds a field's expression to the SELECT statement with its own column name. If a join alias is referenced in the field expression, and the join is defined in field's entity class, it is automatically included in the query. The field is marked as a target at current index for future loading from a data reader.
public static Select ( this query, IField field ) : SqlQuery
query this
field IField Field object
return SqlQuery

Select() public static method

Adds a field's expression to the SELECT statement with a given column name. If a join alias is referenced in the field expression, and the join is defined in field's entity class, it is automatically included in the query. The field is marked as a target at current index for future loading from a data reader.
public static Select ( this query, IField field, string columnName ) : SqlQuery
query this
field IField Field object
columnName string
return SqlQuery

SelectAs() public static method

Adds a field or an expression to the SELECT statement with a column name of a field's name. The field is marked as a target at current index for future loading from a data reader.
public static SelectAs ( this query, string expression, IField intoField ) : SqlQuery
query this
expression string A field name or an expression
intoField IField A field object whose name to be used as a column name.
return SqlQuery