-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMinFunction.cs
More file actions
36 lines (32 loc) · 1.2 KB
/
MinFunction.cs
File metadata and controls
36 lines (32 loc) · 1.2 KB
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
34
35
36
using System;
using Queries.Core.Parts.Columns;
using Queries.Core.Attributes;
namespace Queries.Core.Parts.Functions;
/// <summary>
/// "MIN" function.
/// </summary>
[Function]
public class MinFunction : AggregateFunction
{
/// <summary>
/// Buils a new <see cref="MinFunction"/> instance.
/// </summary>
/// <param name="column">The column the function will be applied onto</param>
/// <exception cref="System.ArgumentNullException">if <paramref name="column"/> is <see langword="null" />.</exception>
public MinFunction(IColumn column)
: base(AggregateType.Min, column)
{ }
/// <summary>
/// Buils a new <see cref="MinFunction"/> instance.
/// </summary>
/// <param name="columnName">The column the function will be applied onto</param>
/// <exception cref="System.ArgumentNullException">if <paramref name="columnName"/> is <see langword="null" />.</exception>
public MinFunction(string columnName)
: this(columnName?.Field())
{ }
/// <summary>
/// Performs a deep copy of the current instance.
/// </summary>
/// <returns><see cref="MinFunction"/></returns>
public override IColumn Clone() => new MinFunction(Column.Clone());
}