24 lines
657 B
C#
24 lines
657 B
C#
using Strata.SqlTools.SqlBreakdown.Interfaces.Core;
|
|
|
|
namespace Strata.SqlTools.SqlBreakdown.Expressions.Functions.DateTime;
|
|
|
|
public class TruncateDateFunction : FunctionExpression
|
|
{
|
|
public Expression DateTimeExpression { get; }
|
|
public string DatePart { get; }
|
|
|
|
public override string FunctionName => "DATE_TRUNC";
|
|
|
|
public TruncateDateFunction(Expression dateTimeExpression, string datePart) : base(datePart, dateTimeExpression)
|
|
{
|
|
DateTimeExpression = dateTimeExpression;
|
|
DatePart = datePart;
|
|
}
|
|
|
|
public override T Accept<T>(IVisitor<T> visitor)
|
|
{
|
|
return visitor.VisitFunctionExpression(this);
|
|
}
|
|
}
|
|
|