Class GroupByExpression
Expression, which represent GROUP BY statement from sql select query.
Namespace: Kros.KORM.Query.Expressions
Assembly: Kros.KORM.dll
Syntax
public class GroupByExpression : QueryExpression
Constructors
GroupByExpression(String)
Initializes a new instance of the GroupByExpression class.
Declaration
public GroupByExpression(string groupBy)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupBy | The groupBy part of sql. |
Remarks
Group by columns are separate by ,
GroupByExpression(String[])
Initializes a new instance of the GroupByExpression class.
Declaration
public GroupByExpression(params string[] groupBy)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | groupBy | The groupBy. |
Fields
GroupByStatement
The group by statement
Declaration
public const string GroupByStatement = "GROUP BY"
Field Value
Type | Description |
---|---|
System.String |
Properties
GroupByPart
Gets or sets the group by part.
Declaration
public string GroupByPart { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Accept(ExpressionVisitor)
Dispatches to the specific visit method for this node type. For example, System.Linq.Expressions.MethodCallExpression calls the System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(System.Linq.Expressions.MethodCallExpression).
Declaration
protected override Expression Accept(ExpressionVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.ExpressionVisitor | visitor | The visitor to visit this node with. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | The result of visiting this node. |
Overrides
System.Linq.Expressions.Expression.Accept(System.Linq.Expressions.ExpressionVisitor)
Create<T, TResult>(Func<T, TResult>)
Creates the GroupByExpression by selector.
Declaration
public static GroupByExpression Create<T, TResult>(Func<T, TResult> selector)
where T : new()
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, TResult> | selector | The selector. |
Returns
Type | Description |
---|---|
GroupByExpression | GroupByExpression |
Type Parameters
Name | Description |
---|---|
T | Type of model class. |
TResult | The type of the result. |