Class AggregateExpression
- Namespace
- FluentCommand.Query.Generators
- Assembly
- FluentCommand.dll
Represents an aggregate function expression (e.g., COUNT, SUM) in a SQL statement.
public record AggregateExpression : ColumnExpression, IEquatable<ColumnExpression>, IEquatable<AggregateExpression>
- Inheritance
-
AggregateExpression
- Implements
- Inherited Members
Constructors
AggregateExpression(AggregateFunctions, string, string, string, bool)
Represents an aggregate function expression (e.g., COUNT, SUM) in a SQL statement.
public AggregateExpression(AggregateFunctions Aggregate, string ColumnName, string TableAlias = null, string ColumnAlias = null, bool IsRaw = false)
Parameters
Aggregate
AggregateFunctionsThe aggregate function to use.
ColumnName
stringThe name of the column to aggregate.
TableAlias
stringThe alias of the table (optional).
ColumnAlias
stringThe alias for the result column (optional).
IsRaw
boolIndicates if the aggregate expression is a raw SQL fragment.
AggregateExpression(AggregateExpression)
protected AggregateExpression(AggregateExpression original)
Parameters
original
AggregateExpression
Properties
Aggregate
The aggregate function to use.
public AggregateFunctions Aggregate { get; init; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Methods
Deconstruct(out AggregateFunctions, out string, out string, out string, out bool)
public void Deconstruct(out AggregateFunctions Aggregate, out string ColumnName, out string TableAlias, out string ColumnAlias, out bool IsRaw)
Parameters
Aggregate
AggregateFunctionsColumnName
stringTableAlias
stringColumnAlias
stringIsRaw
bool
Equals(AggregateExpression?)
public virtual bool Equals(AggregateExpression? other)
Parameters
other
AggregateExpression
Returns
Equals(ColumnExpression?)
public override sealed bool Equals(ColumnExpression? other)
Parameters
other
ColumnExpression
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builder
StringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(AggregateExpression?, AggregateExpression?)
public static bool operator ==(AggregateExpression? left, AggregateExpression? right)
Parameters
left
AggregateExpressionright
AggregateExpression
Returns
operator !=(AggregateExpression?, AggregateExpression?)
public static bool operator !=(AggregateExpression? left, AggregateExpression? right)
Parameters
left
AggregateExpressionright
AggregateExpression