Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public override IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(IEn
return fragments;
}

private static T? GetAndRemove<T>(IDictionary<string, IAnnotation> annotations, string annotationName)
private static T GetAndRemove<T>(IDictionary<string, IAnnotation> annotations, string annotationName)
{
if (annotations.TryGetValue(annotationName, out var annotation)
&& annotation.Value != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public static class ClickHouseArithmeticDbFunctionsExtensions
/// The result type is always <c>double</c>.
/// Integer division is provided by the intDiv function.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="x">Dividend.</param>
/// <param name="y">Divisor</param>
/// <param name="_">DbFunctions instance.</param>
/// <typeparam name="TDividend"></typeparam>
/// <typeparam name="TDivisor"></typeparam>
/// <returns>The quotient of x and y.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public static class ClickHouseBoolDbFunctionsExtensions
/// <summary>
/// Converts an input value to a value of type Bool. Throws an exception in case of an error.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Expression returning a number or a string.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns <c>true</c> or <c>false</c> based on evaluation of the argument.</returns>
/// <remarks>https://clickhouse.com/docs/sql-reference/functions/type-conversion-functions#tobool</remarks>
public static bool ToBool(this DbFunctions _, string expr)
Expand All @@ -21,8 +21,8 @@ public static bool ToBool(this DbFunctions _, string expr)
/// <summary>
/// Converts an input value to a value of type Bool. Throws an exception in case of an error.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Expression returning a number or a string.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns <c>true</c> or <c>false</c> based on evaluation of the argument.</returns>
/// <remarks>https://clickhouse.com/docs/sql-reference/functions/type-conversion-functions#tobool</remarks>
public static bool ToBool<TNumber>(this DbFunctions _, TNumber expr) where TNumber: INumber<TNumber>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public static class ClickHouseDate32DbFunctionsExtensions
/// Converts the argument to the Date32 data type. If the value is outside the range,
/// toDate32 returns the border values supported by Date32. If the argument is of type Date, it's bounds are taken into
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">The value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns a calendar date.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate32(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -25,8 +25,8 @@ public static DateOnly ToDate32(this DbFunctions _, string? expr)
/// Converts the argument to the Date32 data type. If the value is outside the range,
/// toDate32 returns the border values supported by Date32. If the argument is of type Date, it's bounds are taken into
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">The value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns a calendar date.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate32(DbFunctions, uint)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -40,8 +40,8 @@ public static DateOnly ToDate32(this DbFunctions _, uint expr)
/// <summary>
/// The same as <see cref="ToDate32(DbFunctions, string)"/> but returns the min value of Date32 if an invalid argument is received.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">The value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns a calendar date.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate32OrZero(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -55,8 +55,8 @@ public static DateOnly ToDate32OrZero(this DbFunctions _, string? expr)
/// <summary>
/// The same as <see cref="ToDate32(DbFunctions, string)"/> but returns <c>null</c> if an invalid argument is received.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">The value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns></returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate32OrNull(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -66,15 +66,15 @@ public static DateOnly ToDate32OrZero(this DbFunctions _, string? expr)
{
throw new InvalidOperationException();
}

/// <summary>
/// Converts the argument to the Date32 data type.
/// If the value is outside the range, toDate32OrDefault returns the lower border value supported by Date32.
/// If the argument has Date type, it's borders are taken into account.
/// Returns default value if an invalid argument is received.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">The value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns a calendar date.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate32OrDefault(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -91,9 +91,9 @@ public static DateOnly ToDate32OrDefault(this DbFunctions _, string? expr)
/// If the argument has Date type, it's borders are taken into account.
/// Returns default value if an invalid argument is received.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">The value to convert.</param>
/// <param name="defaultValue"></param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns a calendar date.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate32OrDefault(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public static class ClickHouseDateDbFunctionsExtensions
/// <summary>
/// Converts an input value to type Date. Supports conversion from String, FixedString, DateTime, or numeric types.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Input value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <typeparam name="TNumber"></typeparam>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
Expand All @@ -25,8 +25,8 @@ public static DateOnly ToDate<TNumber>(this DbFunctions _, TNumber expr) where T
/// <summary>
/// Converts an input value to type Date. Supports conversion from String, FixedString, DateTime, or numeric types.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Input value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -40,8 +40,8 @@ public static DateOnly ToDate(this DbFunctions _, string? expr)
/// <summary>
/// Converts an input value to type Date. Supports conversion from String, FixedString, DateTime, or numeric types.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Input value to convert.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate(DbFunctions, DateTime)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -55,9 +55,9 @@ public static DateOnly ToDate(this DbFunctions _, DateTime expr)
/// <summary>
/// Converts an input value to type Date. Supports conversion from String, FixedString, DateTime, or numeric types.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Input value to convert.</param>
/// <param name="timeZone">Time zone of the specified Date object.</param>
/// <param name="_">DbFunctions instance.</param>
/// <typeparam name="TNumber"></typeparam>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
Expand All @@ -72,9 +72,9 @@ public static DateOnly ToDate<TNumber>(this DbFunctions _, TNumber expr, string
/// <summary>
/// Converts an input value to type Date. Supports conversion from String, FixedString, DateTime, or numeric types.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Input value to convert.</param>
/// <param name="timeZone">Time zone of the specified Date object.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate(DbFunctions, string, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -88,9 +88,9 @@ public static DateOnly ToDate(this DbFunctions _, string? expr, string timeZone)
/// <summary>
/// Converts an input value to type Date. Supports conversion from String, FixedString, DateTime, or numeric types.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">Input value to convert.</param>
/// <param name="timeZone">Time zone of the specified Date object.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDate(DbFunctions, string, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -105,8 +105,8 @@ public static DateOnly ToDate(this DbFunctions _, DateTime expr, string timeZone
/// Converts an input value to a value of type Date but returns the lower boundary of Date if an invalid argument
/// is received. The same as toDate but returns lower boundary of Date if an invalid argument is received.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">A string representation of a date.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDateOrZero(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -121,8 +121,8 @@ public static DateOnly ToDateOrZero(this DbFunctions _, string? expr)
/// Converts an input value to a value of type Date but returns <c>null</c> if an invalid argument is received.
/// The same as toDate but returns <c>null</c> if an invalid argument is received.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">A string representation of a date.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Returns the converted input value.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDateOrNull(DbFunctions, string)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -137,8 +137,8 @@ public static DateOnly ToDateOrZero(this DbFunctions _, string? expr)
/// Like <see cref="ToDate(DbFunctions, string)"/> but if unsuccessful, returns a default value which is either
/// the second argument (if specified), or otherwise the lower boundary of Date.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">A string representation of a date.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Value of type Date if successful, otherwise returns the default value if passed or 1970-01-01 if not.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDateOrDefault(DbFunctions, string, DateOnly)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand All @@ -152,9 +152,9 @@ public static DateOnly ToDateOrDefault(this DbFunctions _, string? expr)
/// Like <see cref="ToDate(DbFunctions, string)"/> but if unsuccessful, returns a default value which is either
/// the second argument (if specified), or otherwise the lower boundary of Date.
/// </summary>
/// <param name="_">DbFunctions instance.</param>
/// <param name="expr">A string representation of a date.</param>
/// <param name="defaultValue">The default value to return if parsing is unsuccessful.</param>
/// <param name="_">DbFunctions instance.</param>
/// <returns>Value of type Date if successful, otherwise returns the default value if passed or 1970-01-01 if not.</returns>
/// <exception cref="InvalidOperationException">
/// <see cref="ToDateOrDefault(DbFunctions, string, DateOnly)"/> is only intended for use via SQL translation as part of an EF Core LINQ query.
Expand Down
Loading
Loading