Skip to content

Commit

Permalink
[DOCS] Remove unneeded options from [source,sql] code blocks (#42759)
Browse files Browse the repository at this point in the history
In AsciiDoc, `subs="attributes,callouts,macros"` options were required
to render `include-tagged::` in a code block.

With elastic/docs#827, Elasticsearch Reference documentation migrated
from AsciiDoc to Asciidoctor.

In Asciidoctor, the `subs="attributes,callouts,macros"` options are no
longer needed to render `include-tagged::` in a code block. This commit
removes those unneeded options.

Resolves #41589
  • Loading branch information
jrodewig committed May 31, 2019
1 parent 98da84e commit e7d19d4
Show file tree
Hide file tree
Showing 17 changed files with 158 additions and 158 deletions.
28 changes: 14 additions & 14 deletions docs/reference/sql/functions/conditional.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ If all arguments are null, then it returns `null`.



["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[coalesceReturnNonNull]
----

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[coalesceReturnNull]
----
Expand Down Expand Up @@ -82,12 +82,12 @@ If all arguments are null, then it returns `null`.



["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[greatestReturnNonNull]
----

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[greatestReturnNull]
----
Expand Down Expand Up @@ -120,12 +120,12 @@ If all arguments are null, then it returns `null`.



["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[ifNullReturnFirst]
----

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[ifNullReturnSecond]
----
Expand Down Expand Up @@ -159,12 +159,12 @@ If all arguments are null, then it returns `null`.



["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[isNullReturnFirst]
----

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[isNullReturnSecond]
----
Expand Down Expand Up @@ -204,12 +204,12 @@ If all arguments are null, then it returns `null`.



["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[leastReturnNonNull]
----

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[leastReturnNull]
----
Expand Down Expand Up @@ -241,12 +241,12 @@ Returns `null` when the two input expressions are equal and
if not, it returns the 1st expression.


["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[nullIfReturnFirst]
----

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[nullIfReturnNull]
----
Expand Down Expand Up @@ -280,12 +280,12 @@ If all arguments are null, then it returns `null`.



["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[nvlReturnFirst]
----

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
----
include-tagged::{sql-specs}/docs.csv-spec[nvlReturnSecond]
----
Expand Down
70 changes: 35 additions & 35 deletions docs/reference/sql/functions/date-time.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,32 @@ s|Description

Basic arithmetic operators (`+`, `-`, etc) support date/time parameters as indicated below:

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalPlusInterval]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dtDateTimePlusInterval]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dtMinusInterval]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalMinusInterval]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dtDateTimeMinusInterval]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalMul]
--------------------------------------------------
Expand Down Expand Up @@ -116,25 +116,25 @@ Unlike CURRENT_DATE, `CURDATE()` can only be used as a function with no argument

This method always returns the same value for its every occurrence within the same query.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[currentDate]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[currentDateFunction]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[curDateFunction]
--------------------------------------------------

Typically, this function (as well as its twin <<sql-functions-today,TODAY())>> function
is used for relative date filtering:

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[filterToday]
--------------------------------------------------
Expand Down Expand Up @@ -164,25 +164,25 @@ meaning a milliseconds precision current date/time will be returned.

This method always returns the same value for its every occurrence within the same query.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[curTs]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[curTsFunction]
--------------------------------------------------

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[curTsFunctionPrecision]
--------------------------------------------------

Typically, this function (as well as its twin <<sql-functions-now,NOW())>> function is used for
relative date/time filtering:

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[filterNow]
--------------------------------------------------
Expand Down Expand Up @@ -210,7 +210,7 @@ DAY_OF_MONTH(datetime_exp) <1>

Extract the day of the month from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dayOfMonth]
--------------------------------------------------
Expand All @@ -234,7 +234,7 @@ DAY_OF_WEEK(datetime_exp) <1>

Extract the day of the week from a date/datetime. Sunday is `1`, Monday is `2`, etc.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dayOfWeek]
--------------------------------------------------
Expand All @@ -258,7 +258,7 @@ DAY_OF_YEAR(datetime_exp) <1>

Extract the day of the year from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dayOfYear]
--------------------------------------------------
Expand All @@ -282,7 +282,7 @@ DAY_NAME(datetime_exp) <1>

Extract the day of the week from a date/datetime in text format (`Monday`, `Tuesday`...).

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dayName]
--------------------------------------------------
Expand All @@ -306,7 +306,7 @@ HOUR_OF_DAY(datetime_exp) <1>

Extract the hour of the day from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[hourOfDay]
--------------------------------------------------
Expand All @@ -331,7 +331,7 @@ ISO_DAY_OF_WEEK(datetime_exp) <1>
Extract the day of the week from a date/datetime, following the https://en.wikipedia.org/wiki/ISO_week_date[ISO 8601 standard].
Monday is `1`, Tuesday is `2`, etc.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[isoDayOfWeek]
--------------------------------------------------
Expand All @@ -356,7 +356,7 @@ ISO_WEEK_OF_YEAR(datetime_exp) <1>
Extract the week of the year from a date/datetime, following https://en.wikipedia.org/wiki/ISO_week_date[ISO 8601 standard]. The first week
of a year is the first week with a majority (4 or more) of its days in January.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[isoWeekOfYear]
--------------------------------------------------
Expand All @@ -380,7 +380,7 @@ MINUTE_OF_DAY(datetime_exp) <1>

Extract the minute of the day from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[minuteOfDay]
--------------------------------------------------
Expand All @@ -404,7 +404,7 @@ MINUTE_OF_HOUR(datetime_exp) <1>

Extract the minute of the hour from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[minuteOfHour]
--------------------------------------------------
Expand All @@ -428,7 +428,7 @@ MONTH(datetime_exp) <1>

Extract the month of the year from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[monthOfYear]
--------------------------------------------------
Expand All @@ -452,7 +452,7 @@ MONTH_NAME(datetime_exp) <1>

Extract the month from a date/datetime in text format (`January`, `February`...).

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[monthName]
--------------------------------------------------
Expand All @@ -476,15 +476,15 @@ This function offers the same functionality as <<sql-functions-current-timestamp
the datetime when the current query reached the server. This method always returns the same value for its every
occurrence within the same query.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[nowFunction]
--------------------------------------------------

Typically, this function (as well as its twin <<sql-functions-current-timestamp,CURRENT_TIMESTAMP())>> function is used
for relative date/time filtering:

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[filterNow]
--------------------------------------------------
Expand All @@ -508,7 +508,7 @@ SECOND_OF_MINUTE(datetime_exp) <1>

Extract the second of the minute from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[secondOfMinute]
--------------------------------------------------
Expand All @@ -532,7 +532,7 @@ QUARTER(datetime_exp) <1>

Extract the year quarter the date/datetime falls in.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[quarter]
--------------------------------------------------
Expand All @@ -556,15 +556,15 @@ This function offers the same functionality as <<sql-functions-current-date,CURR
the date when the current query reached the server. This method always returns the same value for its every occurrence
within the same query.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[todayFunction]
--------------------------------------------------

Typically, this function (as well as its twin <<sql-functions-current-timestamp,CURRENT_TIMESTAMP())>> function is used
for relative date filtering:

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[filterToday]
--------------------------------------------------
Expand All @@ -588,7 +588,7 @@ WEEK_OF_YEAR(datetime_exp) <1>

Extract the week of the year from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[weekOfYear]
--------------------------------------------------
Expand All @@ -612,7 +612,7 @@ YEAR(datetime_exp) <1>

Extract the year from a date/datetime.

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[year]
--------------------------------------------------
Expand Down Expand Up @@ -640,14 +640,14 @@ EXTRACT(
Extract fields from a date/datetime by specifying the name of a <<sql-functions-datetime,datetime function>>.
The following

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[extractDayOfYear]
--------------------------------------------------

is the equivalent to

["source","sql",subs="attributes,callouts,macros"]
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[dayOfYear]
--------------------------------------------------
Loading

0 comments on commit e7d19d4

Please sign in to comment.