-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCountFunction.cs
More file actions
33 lines (29 loc) · 971 Bytes
/
CountFunction.cs
File metadata and controls
33 lines (29 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Queries.Core.Parts.Columns;
namespace Queries.Core.Parts.Functions;
/// <summary>
/// "COUNT" function.
/// </summary>
public class CountFunction : AggregateFunction
{
/// <summary>
/// Builds a new <see cref="CountFunction"/> instance
/// </summary>
/// <param name="column">column onto which the function will be applied</param>
/// <exception cref="System.ArgumentNullException">if <paramref name="column"/> is <see langword="null" /></exception>
public CountFunction(FieldColumn column)
: base(AggregateType.Count, column)
{ }
#if NET8_0_OR_GREATER
/// <inheritdoc />
public override CountFunction As(string alias)
{
base.As(alias);
return this;
}
#endif
/// <summary>
/// Performs a deep copy of the current instance.
/// </summary>
/// <returns><see cref="CountFunction"/></returns>
public override IColumn Clone() => new CountFunction((FieldColumn)Column.Clone());
}