Table of Contents

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 AggregateFunctions

The aggregate function to use.

ColumnName string

The name of the column to aggregate.

TableAlias string

The alias of the table (optional).

ColumnAlias string

The alias for the result column (optional).

IsRaw bool

Indicates 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

AggregateFunctions

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

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 AggregateFunctions
ColumnName string
TableAlias string
ColumnAlias string
IsRaw bool

Equals(AggregateExpression?)

public virtual bool Equals(AggregateExpression? other)

Parameters

other AggregateExpression

Returns

bool

Equals(ColumnExpression?)

public override sealed bool Equals(ColumnExpression? other)

Parameters

other ColumnExpression

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(AggregateExpression?, AggregateExpression?)

public static bool operator ==(AggregateExpression? left, AggregateExpression? right)

Parameters

left AggregateExpression
right AggregateExpression

Returns

bool

operator !=(AggregateExpression?, AggregateExpression?)

public static bool operator !=(AggregateExpression? left, AggregateExpression? right)

Parameters

left AggregateExpression
right AggregateExpression

Returns

bool