Deprive toStartOfWeek and toLastDayOfWeek functions of in-source documentation

This commit is contained in:
Victor Krasnov 2023-05-29 22:10:34 +00:00
parent 0ad5b9f598
commit 6c94632d47
2 changed files with 4 additions and 24 deletions

View File

@ -17,30 +17,8 @@ REGISTER_FUNCTION(ToCustomWeek)
{ {
factory.registerFunction<FunctionToWeek>(); factory.registerFunction<FunctionToWeek>();
factory.registerFunction<FunctionToYearWeek>(); factory.registerFunction<FunctionToYearWeek>();
factory.registerFunction<FunctionToStartOfWeek>();
factory.registerFunction<FunctionToStartOfWeek>(FunctionDocumentation{.description=R"( factory.registerFunction<FunctionToLastDayOfWeek>();
Rounds a date or date with time down to the nearest Sunday or Monday. Returns the date.
Syntax: toStartOfWeek(t[, mode[, timezone]])
The mode argument works exactly like the mode argument in function `toWeek()`. If no mode is specified, mode is assumed as 0.
Example:
[example:typical]
)",
.examples{
{"typical", "SELECT toStartOfWeek(today(), 1);", ""}},
.categories{"Dates and Times"}}, FunctionFactory::CaseSensitive);
factory.registerFunction<FunctionToLastDayOfWeek>(FunctionDocumentation{.description=R"(
Rounds a date or date with time up to the nearest Saturday or Sunday. Returns the date.
Syntax: toLastDayOfWeek(t[, mode[, timezone]])
The mode argument works exactly like the mode argument in function `toWeek()`. If no mode is specified, mode is assumed as 0.
Example:
[example:typical]
)",
.examples{
{"typical", "SELECT toLastDayOfWeek(today(), 1);", ""}},
.categories{"Dates and Times"}}, FunctionFactory::CaseSensitive);
/// Compatibility aliases for mysql. /// Compatibility aliases for mysql.
factory.registerAlias("week", "toWeek", FunctionFactory::CaseInsensitive); factory.registerAlias("week", "toWeek", FunctionFactory::CaseInsensitive);

View File

@ -784,6 +784,7 @@ toIntervalWeek
toIntervalYear toIntervalYear
toJSONString toJSONString
toLastDayOfMonth toLastDayOfMonth
toLastDayOfWeek
toLowCardinality toLowCardinality
toMinute toMinute
toModifiedJulianDay toModifiedJulianDay
@ -815,6 +816,7 @@ toStartOfNanosecond
toStartOfQuarter toStartOfQuarter
toStartOfSecond toStartOfSecond
toStartOfTenMinutes toStartOfTenMinutes
toStartOfWeek
toStartOfYear toStartOfYear
toString toString
toStringCutToZero toStringCutToZero