public static int?DatePart(this Sql.ISqlExtension ext, Sql.DateParts part, [ExprParameter] DateTime?date) { if (date == null) { return(null); } switch (part) { case Sql.DateParts.Year: return(date.Value.Year); case Sql.DateParts.Quarter: return((date.Value.Month - 1) / 3 + 1); case Sql.DateParts.Month: return(date.Value.Month); case Sql.DateParts.DayOfYear: return(date.Value.DayOfYear); case Sql.DateParts.Day: return(date.Value.Day); case Sql.DateParts.Week: return(CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(date.Value, CalendarWeekRule.FirstDay, DayOfWeek.Sunday)); case Sql.DateParts.WeekDay: return(((int)date.Value.DayOfWeek + 1 + Sql.DateFirst + 6) % 7 + 1); case Sql.DateParts.Hour: return(date.Value.Hour); case Sql.DateParts.Minute: return(date.Value.Minute); case Sql.DateParts.Second: return(date.Value.Second); case Sql.DateParts.Millisecond: return(date.Value.Millisecond); } throw new InvalidOperationException(); }
public static IAggregateFunctionSelfContained <T> Variance <T>(this Sql.ISqlExtension ext, [ExprParameter] object expr, Sql.AggregateModifier modifier) { throw new NotImplementedException(); }
public static IAggregateFunctionSelfContained <T> Sum <T>(this Sql.ISqlExtension ext, [ExprParameter] T expr) { throw new NotImplementedException(); }
public static IAnalyticFunctionWithoutWindow <long> RowNumber(this Sql.ISqlExtension ext) { throw new NotImplementedException(); }
public static IAggregateFunctionSelfContained <T> RegrSXY <T>(this Sql.ISqlExtension ext, [ExprParameter] object expr1, [ExprParameter] object expr2) { throw new NotImplementedException(); }
public static IAnalyticFunctionWithoutWindow <TR> CumeDist <TR>(this Sql.ISqlExtension ext) { throw new NotImplementedException(); }
public static IAnalyticFunctionWithoutWindow <T> PercentRank <T>(this Sql.ISqlExtension ext) { throw new NotImplementedException(); }
public static IMySqlExtensions MySql(this Sql.ISqlExtension ext) => null;
public static IAggregateFunctionSelfContained <T> NthValue <T>(this Sql.ISqlExtension ext, [ExprParameter] T expr, [ExprParameter] long n, Sql.From from, Sql.Nulls nulls) { throw new NotImplementedException(); }
public static IAnalyticFunctionWithoutWindow <T> NTile <T>(this Sql.ISqlExtension ext, [ExprParameter] T expr) { throw new NotImplementedException(); }
public static IReadyToFunctionOrOverWithPartition <T> Median <T>(this Sql.ISqlExtension ext, [ExprParameter] T expr) { throw new NotImplementedException(); }
public static INeedsWithinGroupWithOrderAndMaybePartition <string> ListAgg <T>(this Sql.ISqlExtension ext, [ExprParameter] T expr, [ExprParameter] string delimiter) { throw new NotImplementedException(); }
public static IAnalyticFunctionWithoutWindow <T> Lead <T>(this Sql.ISqlExtension ext, [ExprParameter] T expr, Sql.Nulls nulls, [ExprParameter] int offset, [ExprParameter] int? @default) { throw new NotImplementedException(); }
public static bool In <T>(this Sql.ISqlExtension ext, [ExprParameter] T field, params T[] values) { throw new NotImplementedException(); }
public static INeedsWithinGroupWithSingleOrderAndMaybePartition <T> PercentileDisc <T>(this Sql.ISqlExtension ext, [ExprParameter] object expr) { throw new NotImplementedException(); }
public static ISQLiteExtensions SQLite(this Sql.ISqlExtension ext) => null;
public static INeedsWithinGroupWithOrderOnly <long> Rank(this Sql.ISqlExtension ext, [ExprParameter] params object[] expr) { throw new NotImplementedException(); }
public static string TestGenericExpression <TFirstValue, TSecondValue>(this Sql.ISqlExtension ext, [ExprParameter("first")] TFirstValue value, [ExprParameter("second")] TSecondValue secondValue) { throw new InvalidOperationException("Server-side call failed"); }
public static IOverWithPartitionNeeded <TR> RatioToReport <TR>(this Sql.ISqlExtension ext, [ExprParameter] object expr) { throw new NotImplementedException(); }
public static bool In <T>(this Sql.ISqlExtension ext, [ExprParameter] T field, [SqlQueryDependent] params T[] values) { return(values.Contains(field)); }
public static IAggregateFunctionSelfContained <long> Count(this Sql.ISqlExtension ext) { throw new NotImplementedException(); }